mirror of
https://github.com/bolucat/Archive.git
synced 2025-10-04 15:53:36 +08:00
Update On Sat Jul 26 20:38:16 CEST 2025
This commit is contained in:
1
.github/update.log
vendored
1
.github/update.log
vendored
@@ -1070,3 +1070,4 @@ Update On Tue Jul 22 20:42:19 CEST 2025
|
||||
Update On Wed Jul 23 20:41:36 CEST 2025
|
||||
Update On Thu Jul 24 20:41:09 CEST 2025
|
||||
Update On Fri Jul 25 20:44:18 CEST 2025
|
||||
Update On Sat Jul 26 20:38:09 CEST 2025
|
||||
|
@@ -73,7 +73,7 @@ func (u *CoreUpdater) Update(currentExePath string) (err error) {
|
||||
u.mu.Lock()
|
||||
defer u.mu.Unlock()
|
||||
|
||||
info, err := os.Stat(currentExePath)
|
||||
_, err = os.Stat(currentExePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("check currentExePath %q: %w", currentExePath, err)
|
||||
}
|
||||
@@ -146,8 +146,6 @@ func (u *CoreUpdater) Update(currentExePath string) (err error) {
|
||||
return fmt.Errorf("backuping: %w", err)
|
||||
}
|
||||
|
||||
_ = os.Chmod(updateExePath, info.Mode())
|
||||
|
||||
err = u.replace(updateExePath, currentExePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("replacing: %w", err)
|
||||
@@ -194,13 +192,6 @@ func (u *CoreUpdater) download(updateDir, packagePath, packageURL string) (err e
|
||||
}
|
||||
}()
|
||||
|
||||
log.Debugln("updater: reading http body")
|
||||
// This use of ReadAll is now safe, because we limited body's Reader.
|
||||
body, err := io.ReadAll(io.LimitReader(resp.Body, MaxPackageFileSize))
|
||||
if err != nil {
|
||||
return fmt.Errorf("io.ReadAll() failed: %w", err)
|
||||
}
|
||||
|
||||
log.Debugln("updateDir %s", updateDir)
|
||||
err = os.Mkdir(updateDir, 0o755)
|
||||
if err != nil {
|
||||
@@ -208,10 +199,33 @@ func (u *CoreUpdater) download(updateDir, packagePath, packageURL string) (err e
|
||||
}
|
||||
|
||||
log.Debugln("updater: saving package to file %s", packagePath)
|
||||
err = os.WriteFile(packagePath, body, 0o644)
|
||||
// Create the output file
|
||||
wc, err := os.OpenFile(packagePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755)
|
||||
if err != nil {
|
||||
return fmt.Errorf("os.WriteFile() failed: %w", err)
|
||||
return fmt.Errorf("os.OpenFile(%s): %w", packagePath, err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
closeErr := wc.Close()
|
||||
if closeErr != nil && err == nil {
|
||||
err = closeErr
|
||||
}
|
||||
}()
|
||||
|
||||
log.Debugln("updater: reading http body")
|
||||
// This use of io.Copy is now safe, because we limited body's Reader.
|
||||
n, err := io.Copy(wc, io.LimitReader(resp.Body, MaxPackageFileSize))
|
||||
if err != nil {
|
||||
return fmt.Errorf("io.Copy(): %w", err)
|
||||
}
|
||||
if n == MaxPackageFileSize {
|
||||
// Use whether n is equal to MaxPackageFileSize to determine whether the limit has been reached.
|
||||
// It is also possible that the size of the downloaded file is exactly the same as the maximum limit,
|
||||
// but we should not consider this too rare situation.
|
||||
return fmt.Errorf("attempted to read more than %d bytes", MaxPackageFileSize)
|
||||
}
|
||||
log.Debugln("updater: downloaded package to file %s", packagePath)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -237,12 +251,19 @@ func (u *CoreUpdater) unpack(updateDir, packagePath string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// backup makes a backup of the current executable file
|
||||
// backup creates a backup of the current executable file.
|
||||
func (u *CoreUpdater) backup(currentExePath, backupExePath, backupDir string) (err error) {
|
||||
log.Infoln("updater: backing up current ExecFile:%s to %s", currentExePath, backupExePath)
|
||||
_ = os.Mkdir(backupDir, 0o755)
|
||||
|
||||
// On Windows, since the running executable cannot be overwritten or deleted, it uses os.Rename to move the file to the backup path.
|
||||
// On other platforms, it copies the file to the backup path, preserving the original file and its permissions.
|
||||
// The backup directory is created if it does not exist.
|
||||
if runtime.GOOS == "windows" {
|
||||
err = os.Rename(currentExePath, backupExePath)
|
||||
} else {
|
||||
err = u.copyFile(currentExePath, backupExePath)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -252,20 +273,15 @@ func (u *CoreUpdater) backup(currentExePath, backupExePath, backupDir string) (e
|
||||
|
||||
// replace moves the current executable with the updated one
|
||||
func (u *CoreUpdater) replace(updateExePath, currentExePath string) error {
|
||||
var err error
|
||||
|
||||
log.Infoln("replacing: %s to %s", updateExePath, currentExePath)
|
||||
if runtime.GOOS == "windows" {
|
||||
// rename fails with "File in use" error
|
||||
err = u.copyFile(updateExePath, currentExePath)
|
||||
} else {
|
||||
err = os.Rename(updateExePath, currentExePath)
|
||||
}
|
||||
|
||||
// Use copyFile to retain the original file attributes
|
||||
err := u.copyFile(updateExePath, currentExePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Infoln("updater: renamed: %s to %s", updateExePath, currentExePath)
|
||||
log.Infoln("updater: copy: %s to %s", updateExePath, currentExePath)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -411,10 +427,15 @@ func (u *CoreUpdater) copyFile(src, dst string) (err error) {
|
||||
}
|
||||
}()
|
||||
|
||||
info, err := rc.Stat()
|
||||
if err != nil {
|
||||
return fmt.Errorf("rc.Stat(): %w", err)
|
||||
}
|
||||
|
||||
// Create the output file
|
||||
// If the file does not exist, creates it with permissions perm (before umask);
|
||||
// otherwise truncates it before writing, without changing permissions.
|
||||
wc, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
|
||||
wc, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, info.Mode())
|
||||
if err != nil {
|
||||
return fmt.Errorf("os.OpenFile(%s): %w", dst, err)
|
||||
}
|
||||
|
52
clash-nyanpasu/backend/Cargo.lock
generated
52
clash-nyanpasu/backend/Cargo.lock
generated
@@ -6409,9 +6409,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_allocator"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "423acea26b6422fa0778e91fdcb81b19148b8dd72c3f5ec9c1722b65dc220da2"
|
||||
checksum = "84be1252337ee005688471024aa3c490237e11ef4c18013573d76820718bd28d"
|
||||
dependencies = [
|
||||
"allocator-api2",
|
||||
"bumpalo",
|
||||
@@ -6422,9 +6422,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5229e6d1c3f0e2f89c674f99b4bde8a4d5faf2ed4fc2ad34225d31bea546439"
|
||||
checksum = "4611623aa731f9b6eafbbbb6616ddbfe65622fb9031f7f22b7d985ee9222d93c"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"oxc_allocator",
|
||||
@@ -6438,9 +6438,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast_macros"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aeeaf11189a12a302cd387a2b51c14b6c82bdb9d69d589987c59136fe31144cb"
|
||||
checksum = "59d873a6c17e393ab36dfd10fcd0b5e22581cd8adb6d0936b69c28371d338374"
|
||||
dependencies = [
|
||||
"phf 0.12.1",
|
||||
"proc-macro2",
|
||||
@@ -6450,9 +6450,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ast_visit"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b4b7813efdaaf11f407d3a513c558c9ab6ccb87dd4adc05c481f6c79aa7a3f8"
|
||||
checksum = "40afa7805ea0197de14d18ccfc59004a688d68f7f2696e02619fd4e503f6011d"
|
||||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
@@ -6462,18 +6462,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_data_structures"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f3d5134e4f3d2702f4bc9bbbca6b9dd7110a7d40257f595c6e13aec61d73eb4d"
|
||||
checksum = "4eb262baf5fb69c3971c6662684c2167e58708880f794465fbd53257fec7f087"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oxc_diagnostics"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b25255412a4f73e67e43146f32c723db06ace776a2ee6ba6b44c047aa3c4572"
|
||||
checksum = "58c312b8185e7e63af7d76b5f69520baa53c4d8163ba2ff9e1801d53a9633089"
|
||||
dependencies = [
|
||||
"cow-utils",
|
||||
"oxc-miette",
|
||||
@@ -6482,9 +6482,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_ecmascript"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da6a69b71ba225327213e77146573d1ccc05d180d2be37d4a934ba7e96d7d0b2"
|
||||
checksum = "5a09ef36e663aa5512c8277f282e531d14fa5445493e47b6404f93d77830eb29"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"num-traits",
|
||||
@@ -6495,9 +6495,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_estree"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7587710fe0e28f02015ae47964ebbb2bc3853302c1112632c163cd824fa1fd99"
|
||||
checksum = "79c05d61aacb87526c3b6f10332370e6081592d8fa1e45a95d794fb3e180b165"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_index"
|
||||
@@ -6507,9 +6507,9 @@ checksum = "2fa07b0cfa997730afed43705766ef27792873fdf5215b1391949fec678d2392"
|
||||
|
||||
[[package]]
|
||||
name = "oxc_parser"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fe05c3cc2e9dd89de8f3ecaa250372b044a0194ce1b14526b26ace04d6a5770"
|
||||
checksum = "21908e281daf0c4ff94b66b627daaf2aea4869fbee696e07a7f35e449c633962"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"cow-utils",
|
||||
@@ -6530,9 +6530,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_regular_expression"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44971f48da170fc5d21abf764573d8647b4801b3129993bbbe06759d648a23a4"
|
||||
checksum = "3740a822270e305bb5b946b0a60ae9294f8d2ab71d9cab014bd629433780326c"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"oxc_allocator",
|
||||
@@ -6546,9 +6546,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_span"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e91aabd5bfacf5897d534fa72b23f9f7da99f51bfa2c7bed7683f556b5009607"
|
||||
checksum = "b25ebff6503fe212773c1079110341c67d66ff1cb2d44fbe9f2b202140061187"
|
||||
dependencies = [
|
||||
"compact_str",
|
||||
"oxc-miette",
|
||||
@@ -6559,9 +6559,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "oxc_syntax"
|
||||
version = "0.77.3"
|
||||
version = "0.78.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "307d590d5ff2e5e7b9851bdda04027a93cbae22a924723a3c0e7c1af03662ce4"
|
||||
checksum = "021a06690c525668d7872f2cff6f2c6ed0b43ae9a89ad66aa0faff70aaae80fa"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"cow-utils",
|
||||
@@ -7501,9 +7501,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175"
|
||||
|
||||
[[package]]
|
||||
name = "redb"
|
||||
version = "2.6.0"
|
||||
version = "2.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cef6a6d3a65ea334d6cdfb31fa2525c20184b7aa7bd1ad1e2e37502610d4609f"
|
||||
checksum = "fef838cd981b5c46e9e91e20e4623e43b29b5c251eb245b34da0cbd2da09ab27"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
@@ -172,12 +172,12 @@ display-info = "0.5.0" # should be removed after upgrading to tauri v2
|
||||
|
||||
# OXC (The Oxidation Compiler)
|
||||
# We use it to parse and transpile the old script profile to esm based script profile
|
||||
oxc_parser = "0.77"
|
||||
oxc_allocator = "0.77"
|
||||
oxc_span = "0.77"
|
||||
oxc_ast = "0.77"
|
||||
oxc_syntax = "0.77"
|
||||
oxc_ast_visit = "0.77"
|
||||
oxc_parser = "0.78"
|
||||
oxc_allocator = "0.78"
|
||||
oxc_span = "0.78"
|
||||
oxc_ast = "0.78"
|
||||
oxc_syntax = "0.78"
|
||||
oxc_ast_visit = "0.78"
|
||||
|
||||
# Lua Integration
|
||||
mlua = { version = "0.11", features = [
|
||||
|
@@ -55,7 +55,7 @@
|
||||
"@csstools/normalize.css": "12.1.1",
|
||||
"@emotion/babel-plugin": "11.13.5",
|
||||
"@emotion/react": "11.14.0",
|
||||
"@iconify/json": "2.2.362",
|
||||
"@iconify/json": "2.2.363",
|
||||
"@monaco-editor/react": "4.7.0",
|
||||
"@tanstack/react-query": "5.83.0",
|
||||
"@tanstack/react-router": "1.129.8",
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 1,
|
||||
"latest": {
|
||||
"mihomo": "v1.19.11",
|
||||
"mihomo_alpha": "alpha-dbb002a",
|
||||
"mihomo_alpha": "alpha-a9b7e70",
|
||||
"clash_rs": "v0.8.1",
|
||||
"clash_premium": "2023-09-05-gdcc8d87",
|
||||
"clash_rs_alpha": "0.8.1-alpha+sha.a70dccc"
|
||||
@@ -69,5 +69,5 @@
|
||||
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
|
||||
}
|
||||
},
|
||||
"updated_at": "2025-07-24T22:21:27.539Z"
|
||||
"updated_at": "2025-07-25T22:21:22.078Z"
|
||||
}
|
||||
|
10
clash-nyanpasu/pnpm-lock.yaml
generated
10
clash-nyanpasu/pnpm-lock.yaml
generated
@@ -337,8 +337,8 @@ importers:
|
||||
specifier: 11.14.0
|
||||
version: 11.14.0(@types/react@19.1.8)(react@19.1.0)
|
||||
'@iconify/json':
|
||||
specifier: 2.2.362
|
||||
version: 2.2.362
|
||||
specifier: 2.2.363
|
||||
version: 2.2.363
|
||||
'@monaco-editor/react':
|
||||
specifier: 4.7.0
|
||||
version: 4.7.0(monaco-editor@0.52.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
@@ -1769,8 +1769,8 @@ packages:
|
||||
'@vue/compiler-sfc':
|
||||
optional: true
|
||||
|
||||
'@iconify/json@2.2.362':
|
||||
resolution: {integrity: sha512-Xr0aGINCS453Bp3zKgp30H8FtT2T4lTqB1T9QVHD3ougPgKjfuQM3ij08mY06+4HkVFdllCuReEilo32p7yVlQ==}
|
||||
'@iconify/json@2.2.363':
|
||||
resolution: {integrity: sha512-iSNBti18BhOizJSZCQr/1Mqp9kyqncQfSUElkScsQ0KyLNU2XUNuQ93JAMYtqJbtqtdjjWKidCJu9yfksIQmxA==}
|
||||
|
||||
'@iconify/types@2.0.0':
|
||||
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
||||
@@ -9976,7 +9976,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@iconify/json@2.2.362':
|
||||
'@iconify/json@2.2.363':
|
||||
dependencies:
|
||||
'@iconify/types': 2.0.0
|
||||
pathe: 1.1.2
|
||||
|
@@ -27,6 +27,7 @@ import("dayjs/locale/vi");
|
||||
import("dayjs/locale/zh-cn");
|
||||
import("dayjs/locale/zh-tw");
|
||||
import("dayjs/locale/cs");
|
||||
import("dayjs/locale/no");
|
||||
|
||||
// All i18n resources specified in the plugin `include` option can be loaded
|
||||
// at once using the import syntax
|
||||
|
266
filebrowser/frontend/src/i18n/no.json
Normal file
266
filebrowser/frontend/src/i18n/no.json
Normal file
@@ -0,0 +1,266 @@
|
||||
{
|
||||
"buttons": {
|
||||
"cancel": "Avbryt",
|
||||
"clear": "Fjern",
|
||||
"close": "Lukk",
|
||||
"continue": "Fortsett",
|
||||
"copy": "Kopier",
|
||||
"copyFile": "Fortsett",
|
||||
"copyToClipboard": "Kopier til utklippstavlen",
|
||||
"copyDownloadLinkToClipboard": "Kopier nedlastingslenken til utklippstavlen",
|
||||
"create": "Opprett",
|
||||
"delete": "Slett",
|
||||
"download": "Nedlast",
|
||||
"file": "Fil",
|
||||
"folder": "Mappe",
|
||||
"fullScreen": "Skru på fullskjerm",
|
||||
"hideDotfiles": "Skjul punktfiler",
|
||||
"info": "Info",
|
||||
"more": "Meir",
|
||||
"move": "Flytt",
|
||||
"moveFile": "Flytt Fil",
|
||||
"new": "Ny",
|
||||
"next": "Neste",
|
||||
"ok": "Ok",
|
||||
"permalink": "Få permanent link",
|
||||
"previous": "Tidligere",
|
||||
"preview": "Forhåndsvisning",
|
||||
"publish": "Publiser",
|
||||
"rename": "Gi nytt navn",
|
||||
"replace": "Bytt ut\n ",
|
||||
"reportIssue": "Rapporter problem",
|
||||
"save": "Lagre",
|
||||
"schedule": "Planlegg ",
|
||||
"search": "Søk",
|
||||
"select": "Velg",
|
||||
"selectMultiple": "Velg Fleire",
|
||||
"share": "Del",
|
||||
"shell": "Skru på shell",
|
||||
"submit": "Send",
|
||||
"switchView": "Skift visning",
|
||||
"toggleSidebar": "Skru på sidebar",
|
||||
"update": "Opptater",
|
||||
"upload": "Last opp",
|
||||
"openFile": "Open file",
|
||||
"discardChanges": "Slett"
|
||||
},
|
||||
"download": {
|
||||
"downloadFile": "Nedlast filen",
|
||||
"downloadFolder": "Nedlast mappen",
|
||||
"downloadSelected": "Nedlast merket"
|
||||
},
|
||||
"upload": {
|
||||
"abortUpload": "Er du sikker på at du ønsker å avbryte?"
|
||||
},
|
||||
"errors": {
|
||||
"forbidden": "Du har ikkje tilgang til denne filen.",
|
||||
"internal": "Noko gikk virkelig galt.",
|
||||
"notFound": "Denne lokasjonen kan ikkje bli nådd.",
|
||||
"connection": "Denne serveren kan ikkje nås."
|
||||
},
|
||||
"files": {
|
||||
"body": "Kropp",
|
||||
"closePreview": "Lukk forhandsvisning",
|
||||
"files": "Filer",
|
||||
"folders": "Mappe",
|
||||
"home": "Hjem",
|
||||
"lastModified": "Sist endret",
|
||||
"loading": "Laster....",
|
||||
"lonely": "Det føltes ensomt her...",
|
||||
"metadata": "Metadata",
|
||||
"multipleSelectionEnabled": "Fleire seksjoner på",
|
||||
"name": "Navn",
|
||||
"size": "Størrelse",
|
||||
"sortByLastModified": "Sorter etter sist endret",
|
||||
"sortByName": "Sorter etter navn",
|
||||
"sortBySize": "Sorter etter størrelse",
|
||||
"noPreview": "Forhåndsvisning er ikkje tilgjengeleg for denne filen."
|
||||
},
|
||||
"help": {
|
||||
"click": "velg fil eller katalog",
|
||||
"ctrl": {
|
||||
"click": "velg flere filer eller mapper",
|
||||
"f": "opner søk",
|
||||
"s": "lagr en fil eller last ned direktoratet der du er"
|
||||
},
|
||||
"del": "slett markert filer",
|
||||
"doubleClick": "open en fil eller direktorat",
|
||||
"esc": "visk av seleksjon og/eller lukk dette varselet",
|
||||
"f1": "denne informasjonen",
|
||||
"f2": "gi nytt navn til denne filen",
|
||||
"help": "Hjelp"
|
||||
},
|
||||
"login": {
|
||||
"createAnAccount": "Opprett ein konto",
|
||||
"loginInstead": "Du har allerede ein konto",
|
||||
"password": "Passord",
|
||||
"passwordConfirm": "Passordbekreftelse",
|
||||
"passwordsDontMatch": "Passordene samsvarer ikkje",
|
||||
"signup": "Registrer deg",
|
||||
"submit": "Logg inn",
|
||||
"username": "Brukernavn",
|
||||
"usernameTaken": "Brukernavn er allerede i bruk",
|
||||
"wrongCredentials": "Feil legitimasjon"
|
||||
},
|
||||
"permanent": "Permanent",
|
||||
"prompts": {
|
||||
"copy": "Kopiere",
|
||||
"copyMessage": "Velg hvor du vil kopiere filene dine:",
|
||||
"currentlyNavigating": "Navigerer nå på:",
|
||||
"deleteMessageMultiple": "Er du sikker på at du vil slette {count} fil(er)?",
|
||||
"deleteMessageSingle": "Er du sikker på at du vil slette denne filen/mappen?",
|
||||
"deleteMessageShare": "Er du sikker på at du vil slette denne delingen ({path})?",
|
||||
"deleteUser": "Er du sikker at du vil slette denne brukeren?",
|
||||
"deleteTitle": "Slett filer",
|
||||
"displayName": "Vis Navn:",
|
||||
"download": "Last ned filer",
|
||||
"downloadMessage": "Velg kva format du ønsker å laste ned.",
|
||||
"error": "Noko gikk galt.",
|
||||
"fileInfo": "Fil informasjon",
|
||||
"filesSelected": "{count} filer valgt.",
|
||||
"lastModified": "Sist endret",
|
||||
"move": "Flytt",
|
||||
"moveMessage": "Velg nytt hjem for filen(e)/mappen(e)din:",
|
||||
"newArchetype": "Opprett et nytt innlegg basert på en arketype. Filen din opprettes i innholdsmappen.",
|
||||
"newDir": "Nytt Direktorat",
|
||||
"newDirMessage": "Navn gi ditt nye direktorat",
|
||||
"newFile": "Ny fil",
|
||||
"newFileMessage": "Navn gi ditt nye fil",
|
||||
"numberDirs": "Nummer av direktorat",
|
||||
"numberFiles": "Nummer av filer",
|
||||
"rename": "Gi nytt navn",
|
||||
"renameMessage": "Sett inn nytt navn for",
|
||||
"replace": "Bytt ut",
|
||||
"replaceMessage": "En av filene du prøver å laste opp har et motstridende navn. Vil du hoppe over denne filen og fortsette opplastingen eller erstatte den eksisterende?\n",
|
||||
"schedule": "Planlegg",
|
||||
"scheduleMessage": "Velg en dato og et klokkeslett for å planlegge publiseringen av dette innlegget.",
|
||||
"show": "Vis",
|
||||
"size": "Størrelse",
|
||||
"upload": "Last opp",
|
||||
"uploadFiles": "Laster opp {filer} filer...",
|
||||
"uploadMessage": "Velg et alternativ for opplasting.",
|
||||
"optionalPassword": "Valgfritt passord",
|
||||
"resolution": "Oppløysning",
|
||||
"discardEditorChanges": "Er du sikker på at du vil forkaste endringene du har gjort?"
|
||||
},
|
||||
"search": {
|
||||
"images": "Bilde",
|
||||
"music": "Musikk",
|
||||
"pdf": "PDF",
|
||||
"pressToSearch": "Trykk enter for å søke...",
|
||||
"search": "Søk...",
|
||||
"typeToSearch": "Trykk for å søke...",
|
||||
"types": "Typer",
|
||||
"video": "Video"
|
||||
},
|
||||
"settings": {
|
||||
"admin": "Admin",
|
||||
"administrator": "Administrator",
|
||||
"allowCommands": "Utfør kommandoer",
|
||||
"allowEdit": "Rediger, gi nytt navn til og slett filer eller mapper",
|
||||
"allowNew": "Opprett nye filer og direktorater",
|
||||
"allowPublish": "Publiser nye innlegg og sider",
|
||||
"allowSignup": "Tilat brukere å registrere seg",
|
||||
"avoidChanges": "(la stå tomt for å unngå endringer)",
|
||||
"branding": "Merkevarebygging",
|
||||
"brandingDirectoryPath": "Bane for merkevarekatalog",
|
||||
"brandingHelp": "Du kan tilpasse hvordan Filleser-instansen din ser ut og føles ved å endre navnet, erstatte logoen, legge til egendefinerte stiler og til og med deaktivere eksterne lenker til GitHub.\n\nFor mer informasjon om tilpasset merkevarebygging, se {0}.",
|
||||
"changePassword": "Skift Passord",
|
||||
"commandRunner": "Kommandoløper",
|
||||
"commandRunnerHelp": "Her kan du angi kommandoer som skal utføres i de navngitte hendelsene. Du må skrive én per linje. Miljøvariablene {0} og {1} vil være tilgjengelige, siden de er {0} relative til {1}. For mer informasjon om denne funksjonen og de tilgjengelige miljøvariablene, vennligst les {2}.",
|
||||
"commandsUpdated": "Komando opptatert!",
|
||||
"createUserDir": "Opprett brukerens hjemmappe automatisk når du legger til en ny bruker",
|
||||
"minimumPasswordLength": "Minimum passord lengde",
|
||||
"tusUploads": "Klumpede opplastinger",
|
||||
"tusUploadsHelp": "Filleseren støtter opplasting av delte filer, noe som gjør det mulig å lage effektive, pålitelige, gjenopptakbare og delte filer, selv på upålitelige nettverk.",
|
||||
"tusUploadsChunkSize": "Angir maksimal størrelse på en forespørsel (direkte opplastinger vil bli brukt for mindre opplastinger). Du kan legge inn et heltall som angir bytestørrelsen, eller en streng som 10 MB, 1 GB osv.",
|
||||
"tusUploadsRetryCount": "Antall nye forsøk som skal utføres hvis en del ikke lastes opp.",
|
||||
"userHomeBasePath": "Basissti for brukerens hjemmekataloger",
|
||||
"userScopeGenerationPlaceholder": "Omfanget vil bli generert automatisk",
|
||||
"createUserHomeDirectory": "Opprett bruker hjemme direktorat",
|
||||
"customStylesheet": "Egendefinert stilark",
|
||||
"defaultUserDescription": "Dette er standardinnstillingene for nye brukere.",
|
||||
"disableExternalLinks": "Deaktiver eksterne lenker (unntatt dokumentasjon)",
|
||||
"disableUsedDiskPercentage": "Deaktiver grafen for prosentandelen brukt disk",
|
||||
"documentation": "dokumentasjon",
|
||||
"examples": "Eksempel",
|
||||
"executeOnShell": "Kjør på skall",
|
||||
"executeOnShellDescription": "Som standard kjører Filleseren kommandoene ved å kalle binærfilene direkte. Hvis du heller ønsker å kjøre dem på et skall (som Bash eller PowerShell), kan du definere det her med de nødvendige argumentene og flaggene. Hvis dette er angitt, vil kommandoen du kjører bli lagt til som et argument. Dette gjelder både brukerkommandoer og hendelseshooker.",
|
||||
"globalRules": "Dette er et globalt sett med regler for tillatelse og forbud. De gjelder for alle brukere. Du kan definere spesifikke regler for hver brukers innstillinger for å overstyre disse.",
|
||||
"globalSettings": "Globale Innstillinger",
|
||||
"hideDotfiles": "Skjul punktfiler",
|
||||
"insertPath": "Sett inn banen",
|
||||
"insertRegex": "sett inn regex-uttrykk",
|
||||
"instanceName": "Forekomstnavn",
|
||||
"language": "Språk",
|
||||
"lockPassword": "Hindre brukeren i å endre passordet",
|
||||
"newPassword": "Sett ditt nye passord",
|
||||
"newPasswordConfirm": "Bekreft ditt nye passord",
|
||||
"newUser": "Ny bruker",
|
||||
"password": "Passord",
|
||||
"passwordUpdated": "Passord opptatert!",
|
||||
"path": "Veg",
|
||||
"perm": {
|
||||
"create": "Opprett filer og direktorater",
|
||||
"delete": "Slett filer og direktorater",
|
||||
"download": "Nedlast",
|
||||
"execute": "Utfør kommandoer",
|
||||
"modify": "Endre filer",
|
||||
"rename": "Gi nytt navn eller flytt filer og direktorater",
|
||||
"share": "Del filer"
|
||||
},
|
||||
"permissions": "Tilaterser",
|
||||
"permissionsHelp": "Du kan angi brukeren som administrator eller velge tillatelsene individuelt. Hvis du velger «Administrator», vil alle de andre alternativene bli automatisk avkrysset. Administrasjon av brukere er fortsatt et privilegium for en administrator.\n",
|
||||
"profileSettings": "Profil Innstilinger",
|
||||
"ruleExample1": "forhindrer tilgang til noen dotfiler (som .git, .gitignore) i alle mapper.\n",
|
||||
"ruleExample2": "blokkerer tilgangen til filen med navnet Caddyfile på roten av omfanget.",
|
||||
"rules": "Regler",
|
||||
"rulesHelp": "Her kan du definere et sett med tillatelses- og forbudsregler for denne spesifikke brukeren. De blokkerte filene vil ikke vises i listene, og de vil ikke være tilgjengelige for brukeren. Vi støtter regex og stier i forhold til brukerens omfang.",
|
||||
"scope": "Omfang",
|
||||
"setDateFormat": "Sett eksakt dato format",
|
||||
"settingsUpdated": "Innstilinger opptatert!",
|
||||
"shareDuration": "Del tidsbruk",
|
||||
"shareManagement": "Del Ledelse",
|
||||
"shareDeleted": "Delte ting slettet!",
|
||||
"singleClick": "Bruk enkeltklikk for å åpne filer og mapper",
|
||||
"themes": {
|
||||
"default": "Systemstandard",
|
||||
"dark": "Mørk",
|
||||
"light": "Lyst",
|
||||
"title": "Tema"
|
||||
},
|
||||
"user": "Bruker",
|
||||
"userCommands": "Kommando",
|
||||
"userCommandsHelp": "En mellomromsseparert liste med tilgjengelige kommandoer for denne brukeren. Eksempel:\n",
|
||||
"userCreated": "Bruker opprettet!",
|
||||
"userDefaults": "Bruker systemstandard instillinger",
|
||||
"userDeleted": "Bruker slettet!",
|
||||
"userManagement": "Brukeradministrasjon",
|
||||
"userUpdated": "Bruker opprettet!",
|
||||
"username": "Brukernavn",
|
||||
"users": "Bruker"
|
||||
},
|
||||
"sidebar": {
|
||||
"help": "Hjelp",
|
||||
"hugoNew": "Hugo Ny",
|
||||
"login": "Logg inn",
|
||||
"logout": "Logg Ut",
|
||||
"myFiles": "Mine filer",
|
||||
"newFile": "Ny fil",
|
||||
"newFolder": "Ny mappe",
|
||||
"preview": "Forhåndsvis",
|
||||
"settings": "Innstillinger",
|
||||
"signup": "Registrer deg",
|
||||
"siteSettings": "Side innstillinger"
|
||||
},
|
||||
"success": {
|
||||
"linkCopied": "Link koppiert!"
|
||||
},
|
||||
"time": {
|
||||
"days": "Dager",
|
||||
"hours": "Timer",
|
||||
"minutes": "Minutt",
|
||||
"seconds": "Sekunder",
|
||||
"unit": "Time format"
|
||||
}
|
||||
}
|
@@ -8,7 +8,7 @@ require (
|
||||
github.com/apernet/go-tproxy v0.0.0-20230809025308-8f4723fd742f
|
||||
github.com/apernet/hysteria/core/v2 v2.0.0-00010101000000-000000000000
|
||||
github.com/apernet/hysteria/extras/v2 v2.0.0-00010101000000-000000000000
|
||||
github.com/apernet/sing-tun v0.2.6-0.20240323130332-b9f6511036ad
|
||||
github.com/apernet/sing-tun v0.2.6-0.20250726070404-c99085f9af13
|
||||
github.com/caddyserver/certmagic v0.17.2
|
||||
github.com/libdns/cloudflare v0.1.1
|
||||
github.com/libdns/duckdns v0.2.0
|
||||
|
@@ -44,8 +44,8 @@ github.com/apernet/go-tproxy v0.0.0-20230809025308-8f4723fd742f h1:uVh0qpEslrWjg
|
||||
github.com/apernet/go-tproxy v0.0.0-20230809025308-8f4723fd742f/go.mod h1:xkkq9D4ygcldQQhKS/w9CadiCKwCngU7K9E3DaKahpM=
|
||||
github.com/apernet/quic-go v0.52.1-0.20250607183305-9320c9d14431 h1:9/jM7e+kVALd7Jfu1c27dcEpT/Fd/Gzq2OsQjKjakKI=
|
||||
github.com/apernet/quic-go v0.52.1-0.20250607183305-9320c9d14431/go.mod h1:I/47OIGG5H/IfAm+nz2c6hm6b/NkEhpvptAoiPcY7jQ=
|
||||
github.com/apernet/sing-tun v0.2.6-0.20240323130332-b9f6511036ad h1:QzQ2sKpc9o42HNRR8ukM5uMC/RzR2HgZd/Nvaqol2C0=
|
||||
github.com/apernet/sing-tun v0.2.6-0.20240323130332-b9f6511036ad/go.mod h1:S5IydyLSN/QAfvY+r2GoomPJ6hidtXWm/Ad18sJVssk=
|
||||
github.com/apernet/sing-tun v0.2.6-0.20250726070404-c99085f9af13 h1:gzets97c/u5iMj1zjanMBVkIYOdaVw+RXPzTT1xQoyM=
|
||||
github.com/apernet/sing-tun v0.2.6-0.20250726070404-c99085f9af13/go.mod h1:S5IydyLSN/QAfvY+r2GoomPJ6hidtXWm/Ad18sJVssk=
|
||||
github.com/babolivier/go-doh-client v0.0.0-20201028162107-a76cff4cb8b6 h1:4NNbNM2Iq/k57qEu7WfL67UrbPq1uFWxW4qODCohi+0=
|
||||
github.com/babolivier/go-doh-client v0.0.0-20201028162107-a76cff4cb8b6/go.mod h1:J29hk+f9lJrblVIfiJOtTFk+OblBawmib4uz/VdKzlg=
|
||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||
|
@@ -123,11 +123,7 @@ func (t *tunHandler) NewConnection(ctx context.Context, conn net.Conn, m metadat
|
||||
defer rc.Close()
|
||||
|
||||
// start forwarding
|
||||
copyErrChan := make(chan error, 3)
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
copyErrChan <- ctx.Err()
|
||||
}()
|
||||
copyErrChan := make(chan error, 2)
|
||||
go func() {
|
||||
_, copyErr := io.Copy(rc, conn)
|
||||
copyErrChan <- copyErr
|
||||
@@ -136,7 +132,11 @@ func (t *tunHandler) NewConnection(ctx context.Context, conn net.Conn, m metadat
|
||||
_, copyErr := io.Copy(conn, rc)
|
||||
copyErrChan <- copyErr
|
||||
}()
|
||||
closeErr = <-copyErrChan
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
closeErr = ctx.Err()
|
||||
case closeErr = <-copyErrChan:
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -160,11 +160,7 @@ func (t *tunHandler) NewPacketConnection(ctx context.Context, conn network.Packe
|
||||
defer rc.Close()
|
||||
|
||||
// start forwarding
|
||||
copyErrChan := make(chan error, 3)
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
copyErrChan <- ctx.Err()
|
||||
}()
|
||||
copyErrChan := make(chan error, 2)
|
||||
// local <- remote
|
||||
go func() {
|
||||
for {
|
||||
@@ -205,7 +201,11 @@ func (t *tunHandler) NewPacketConnection(ctx context.Context, conn network.Packe
|
||||
}
|
||||
}
|
||||
}()
|
||||
closeErr = <-copyErrChan
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
closeErr = ctx.Err()
|
||||
case closeErr = <-copyErrChan:
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .239
|
||||
LINUX_KERNEL_HASH-5.10.239 = 2dfa422b6bbe65a6b352a38129d27de918c3f0f05c72ecdd39d46d657ca0f0db
|
||||
LINUX_VERSION-5.10 = .240
|
||||
LINUX_KERNEL_HASH-5.10.240 = 8d88c3977226d666554b75f480d1e6c5f4e4d2acdf2a3462840c6bac88634d13
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .186
|
||||
LINUX_KERNEL_HASH-5.15.186 = 9c4efdd7ee550d524c017b5dae27725374526311e983661850cd880af671cb2a
|
||||
LINUX_VERSION-5.15 = .189
|
||||
LINUX_KERNEL_HASH-5.15.189 = e3d0025b87278e14733cb326700f17c7cceb54d920622b0d5fcd58a88c6850c3
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.4 = .295
|
||||
LINUX_KERNEL_HASH-5.4.295 = c48158f7735668aac78b9d74bb3616f57a4ea0816ca09f7db83f7834d705b6a9
|
||||
LINUX_VERSION-5.4 = .296
|
||||
LINUX_KERNEL_HASH-5.4.296 = 3d63614e58bf1befaba3f5713145200d09f26e564832c8948094fdf5b11fa73a
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.1 = .144
|
||||
LINUX_KERNEL_HASH-6.1.144 = 0f49bda42fbd7506063d537fec7d4d147c373a0324655fdaf2a65a000c9f7acf
|
||||
LINUX_VERSION-6.1 = .147
|
||||
LINUX_KERNEL_HASH-6.1.147 = 218f25663a41e3d811e84fa1c4acec50684898b2f6d0c8c0deb531d937e466f7
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.12 = .38
|
||||
LINUX_KERNEL_HASH-6.12.38 = f035fa8d83d59f793c76b23567b130cc42118f10696815fed03c16bb15670fcc
|
||||
LINUX_VERSION-6.12 = .40
|
||||
LINUX_KERNEL_HASH-6.12.40 = 4811af1317f98d2cccea3c7695969a2c03a27cb02fd2d5327032dd5341842933
|
||||
|
@@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .98
|
||||
LINUX_KERNEL_HASH-6.6.98 = 296a34c500abc22c434b967d471d75568891f06a98f11fc31c5e79b037f45de5
|
||||
LINUX_VERSION-6.6 = .100
|
||||
LINUX_KERNEL_HASH-6.6.100 = d6c0ec4d55b14814f55b62a0b23a2d95faf66877e48fbfb4b83523e4afdf97ba
|
||||
|
@@ -42,7 +42,9 @@ define U-Boot/evb-rk3576
|
||||
BUILD_SUBTARGET:=armv8
|
||||
NAME:=RK3576 Evaluation
|
||||
BUILD_DEVICES:= \
|
||||
armsom_sige5
|
||||
armsom_sige5 \
|
||||
ariaboard_photonicat2 \
|
||||
friendlyarm_nanopi-r76s
|
||||
DEPENDS:=+PACKAGE_u-boot-evb-rk3576:rkbin-rk3576
|
||||
ATF:=rk3576_bl31_v1.12.elf
|
||||
DDR:=rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin
|
||||
|
@@ -59,17 +59,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
goto err_kfree;
|
||||
}
|
||||
|
||||
@@ -169,8 +176,8 @@ static int u_boot_env_parse(struct u_boo
|
||||
break;
|
||||
}
|
||||
crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
|
||||
- crc32_data_len = priv->mtd->size - crc32_data_offset;
|
||||
- data_len = priv->mtd->size - data_offset;
|
||||
+ crc32_data_len = dev_size - crc32_data_offset;
|
||||
+ data_len = dev_size - data_offset;
|
||||
|
||||
calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L;
|
||||
if (calc != crc32) {
|
||||
@@ -179,7 +186,7 @@ static int u_boot_env_parse(struct u_boo
|
||||
goto err_kfree;
|
||||
}
|
||||
|
@@ -41,16 +41,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
if (!buf) {
|
||||
err = -ENOMEM;
|
||||
goto err_out;
|
||||
@@ -175,7 +176,8 @@ static int u_boot_env_parse(struct u_boo
|
||||
data_offset = offsetof(struct u_boot_env_image_broadcom, data);
|
||||
break;
|
||||
}
|
||||
- crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset));
|
||||
+ crc32_addr = (__le32 *)(buf + crc32_offset);
|
||||
+ crc32 = le32_to_cpu(*crc32_addr);
|
||||
crc32_data_len = dev_size - crc32_data_offset;
|
||||
data_len = dev_size - data_offset;
|
||||
|
||||
@@ -188,8 +190,6 @@ static int u_boot_env_parse(struct u_boo
|
||||
|
||||
buf[dev_size - 1] = '\0';
|
||||
|
@@ -14,8 +14,13 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,12,0)
|
||||
#include <asm/unaligned.h>
|
||||
#else
|
||||
#include <linux/unaligned.h>
|
||||
#endif
|
||||
|
||||
#include "mtdsplit.h"
|
||||
|
||||
|
@@ -1,35 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Sat, 5 Jul 2025 13:44:10 +0200
|
||||
Subject: [PATCH] net: fix TCP/UDP fraglist GRO
|
||||
|
||||
Since "net: gro: use cb instead of skb->network_header", the skb network
|
||||
header is no longer set in the GRO path.
|
||||
This breaks fraglist segmentation, which relies on ip_hdr()/tcp_hdr()
|
||||
to check for address/port changes.
|
||||
Fix this regression by selectively setting the network header for merged
|
||||
segment skbs.
|
||||
|
||||
Fixes: 186b1ea73ad8 ("net: gro: use cb instead of skb->network_header")
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/net/ipv4/tcp_offload.c
|
||||
+++ b/net/ipv4/tcp_offload.c
|
||||
@@ -355,6 +355,7 @@ struct sk_buff *tcp_gro_receive(struct l
|
||||
flush |= skb->ip_summed != p->ip_summed;
|
||||
flush |= skb->csum_level != p->csum_level;
|
||||
flush |= NAPI_GRO_CB(p)->count >= 64;
|
||||
+ skb_set_network_header(skb, skb_gro_receive_network_offset(skb));
|
||||
|
||||
if (flush || skb_gro_receive_list(p, skb))
|
||||
mss = 1;
|
||||
--- a/net/ipv4/udp_offload.c
|
||||
+++ b/net/ipv4/udp_offload.c
|
||||
@@ -604,6 +604,7 @@ static struct sk_buff *udp_gro_receive_s
|
||||
NAPI_GRO_CB(skb)->flush = 1;
|
||||
return NULL;
|
||||
}
|
||||
+ skb_set_network_header(skb, skb_gro_receive_network_offset(skb));
|
||||
ret = skb_gro_receive_list(p, skb);
|
||||
} else {
|
||||
skb_gro_postpull_rcsum(skb, uh,
|
@@ -41,6 +41,11 @@ friendlyarm,nanopi-r6s)
|
||||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth2"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth0"
|
||||
;;
|
||||
friendlyarm,nanopi-r76s)
|
||||
ucidef_set_led_default "power" "POWER" "red:power" "1"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
;;
|
||||
hinlink,opc-h28k)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_netdev "lan" "LAN" "amber:lan" "eth0"
|
||||
|
@@ -38,6 +38,7 @@ rockchip_setup_interfaces()
|
||||
firefly,rk3568-roc-pc|\
|
||||
friendlyarm,nanopi-r3s|\
|
||||
friendlyarm,nanopi-r5c|\
|
||||
friendlyarm,nanopi-r76s|\
|
||||
friendlyarm,nanopc-t6|\
|
||||
hinlink,opc-h28k|\
|
||||
mmbox,anas3035|\
|
||||
@@ -145,6 +146,10 @@ rockchip_setup_macs()
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk1)
|
||||
lan_mac=$(macaddr_add "$wan_mac" +1)
|
||||
;;
|
||||
friendlyarm,nanopi-r76s)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk2)
|
||||
lan_mac=$(macaddr_add "$wan_mac" +1)
|
||||
;;
|
||||
xunlong,orangepi-r1-plus|\
|
||||
xunlong,orangepi-r1-plus-lts)
|
||||
lan_mac=$(cat /sys/class/net/eth1/address)
|
||||
|
@@ -1,814 +0,0 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (c) 2024 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
/ {
|
||||
thermal_zones: thermal-zones {
|
||||
/* sensor near the center of the SoC */
|
||||
package_thermal: package-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 0>;
|
||||
|
||||
trips {
|
||||
package_crit: package-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* sensor for cluster1 (big Cortex-A72 cores) */
|
||||
bigcore_thermal: bigcore-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 1>;
|
||||
|
||||
trips {
|
||||
bigcore_alert: bigcore-alert {
|
||||
temperature = <85000>;
|
||||
hysteresis = <2000>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
bigcore_crit: bigcore-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&bigcore_alert>;
|
||||
cooling-device =
|
||||
<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_b2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_b3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* sensor for cluster0 (little Cortex-A53 cores) */
|
||||
littlecore_thermal: littlecore-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 2>;
|
||||
|
||||
trips {
|
||||
littlecore_alert: littlecore-alert {
|
||||
temperature = <85000>;
|
||||
hysteresis = <2000>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
littlecore_crit: littlecore-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&littlecore_alert>;
|
||||
cooling-device =
|
||||
<&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
<&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpu_thermal: gpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 3>;
|
||||
|
||||
trips {
|
||||
gpu_alert: gpu-alert {
|
||||
temperature = <85000>;
|
||||
hysteresis = <2000>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
gpu_crit: gpu-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&gpu_alert>;
|
||||
cooling-device =
|
||||
<&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
npu_thermal: npu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 4>;
|
||||
|
||||
trips {
|
||||
npu_crit: npu-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ddr_thermal: ddr-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&tsadc 5>;
|
||||
|
||||
trips {
|
||||
ddr_crit: ddr-crit {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
hdptxphy_grf: syscon@26032000 {
|
||||
compatible = "rockchip,rk3576-hdptxphy-grf", "syscon";
|
||||
reg = <0x0 0x26032000 0x0 0x100>;
|
||||
clocks = <&cru PCLK_PMUPHY_ROOT>;
|
||||
};
|
||||
|
||||
pcie0: pcie@2a200000 {
|
||||
compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
bus-range = <0x0 0xf>;
|
||||
clocks = <&cru ACLK_PCIE0_MST>, <&cru ACLK_PCIE0_SLV>,
|
||||
<&cru ACLK_PCIE0_DBI>, <&cru PCLK_PCIE0>,
|
||||
<&cru CLK_PCIE0_AUX>;
|
||||
|
||||
clock-names = "aclk_mst", "aclk_slv",
|
||||
"aclk_dbi", "pclk",
|
||||
"aux";
|
||||
device_type = "pci";
|
||||
interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pcie0_intc 0>,
|
||||
<0 0 0 2 &pcie0_intc 1>,
|
||||
<0 0 0 3 &pcie0_intc 2>,
|
||||
<0 0 0 4 &pcie0_intc 3>;
|
||||
linux,pci-domain = <0>;
|
||||
num-ib-windows = <8>;
|
||||
num-viewport = <8>;
|
||||
num-ob-windows = <2>;
|
||||
max-link-speed = <2>;
|
||||
num-lanes = <1>;
|
||||
phys = <&combphy0_ps PHY_TYPE_PCIE>;
|
||||
phy-names = "pcie-phy";
|
||||
power-domains = <&power RK3576_PD_PHP>;
|
||||
ranges = <0x01000000 0x0 0x20100000 0x0 0x20100000 0x0 0x00100000
|
||||
0x02000000 0x0 0x20200000 0x0 0x20200000 0x0 0x00e00000
|
||||
0x03000000 0x9 0x00000000 0x9 0x00000000 0x0 0x80000000>;
|
||||
reg = <0x0 0x22000000 0x0 0x00400000>,
|
||||
<0x0 0x2a200000 0x0 0x00010000>,
|
||||
<0x0 0x20000000 0x0 0x00100000>;
|
||||
reg-names = "dbi", "apb", "config";
|
||||
resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
|
||||
reset-names = "pwr", "pipe";
|
||||
status = "disabled";
|
||||
|
||||
pcie0_intc: legacy-interrupt-controller {
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie1: pcie@2a210000 {
|
||||
compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
bus-range = <0x20 0x2f>;
|
||||
clocks = <&cru ACLK_PCIE1_MST>, <&cru ACLK_PCIE1_SLV>,
|
||||
<&cru ACLK_PCIE1_DBI>, <&cru PCLK_PCIE1>,
|
||||
<&cru CLK_PCIE1_AUX>;
|
||||
clock-names = "aclk_mst", "aclk_slv",
|
||||
"aclk_dbi", "pclk",
|
||||
"aux";
|
||||
device_type = "pci";
|
||||
interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pcie1_intc 0>,
|
||||
<0 0 0 2 &pcie1_intc 1>,
|
||||
<0 0 0 3 &pcie1_intc 2>,
|
||||
<0 0 0 4 &pcie1_intc 3>;
|
||||
linux,pci-domain = <1>;
|
||||
num-ib-windows = <8>;
|
||||
num-viewport = <8>;
|
||||
num-ob-windows = <2>;
|
||||
max-link-speed = <2>;
|
||||
num-lanes = <1>;
|
||||
phys = <&combphy1_psu PHY_TYPE_PCIE>;
|
||||
phy-names = "pcie-phy";
|
||||
power-domains = <&power RK3576_PD_SUBPHP>;
|
||||
ranges = <0x01000000 0x0 0x21100000 0x0 0x21100000 0x0 0x00100000
|
||||
0x02000000 0x0 0x21200000 0x0 0x21200000 0x0 0x00e00000
|
||||
0x03000000 0x9 0x80000000 0x9 0x80000000 0x0 0x80000000>;
|
||||
reg = <0x0 0x22400000 0x0 0x00400000>,
|
||||
<0x0 0x2a210000 0x0 0x00010000>,
|
||||
<0x0 0x21000000 0x0 0x00100000>;
|
||||
reg-names = "dbi", "apb", "config";
|
||||
resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
|
||||
reset-names = "pwr", "pipe";
|
||||
status = "disabled";
|
||||
|
||||
pcie1_intc: legacy-interrupt-controller {
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 266 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
|
||||
vop: vop@27d00000 {
|
||||
compatible = "rockchip,rk3576-vop";
|
||||
reg = <0x0 0x27d00000 0x0 0x3000>, <0x0 0x27d05000 0x0 0x1000>;
|
||||
reg-names = "vop", "gamma-lut";
|
||||
interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 380 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 381 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "sys",
|
||||
"vp0",
|
||||
"vp1",
|
||||
"vp2";
|
||||
clocks = <&cru ACLK_VOP>,
|
||||
<&cru HCLK_VOP>,
|
||||
<&cru DCLK_VP0>,
|
||||
<&cru DCLK_VP1>,
|
||||
<&cru DCLK_VP2>,
|
||||
<&hdptxphy>;
|
||||
clock-names = "aclk",
|
||||
"hclk",
|
||||
"dclk_vp0",
|
||||
"dclk_vp1",
|
||||
"dclk_vp2",
|
||||
"pll_hdmiphy0";
|
||||
iommus = <&vop_mmu>;
|
||||
power-domains = <&power RK3576_PD_VOP>;
|
||||
rockchip,grf = <&sys_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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
vop_mmu: iommu@27d07e00 {
|
||||
compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu";
|
||||
reg = <0x0 0x27d07e00 0x0 0x100>, <0x0 0x27d07f00 0x0 0x100>;
|
||||
interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vop_mmu";
|
||||
clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
|
||||
clock-names = "aclk", "iface";
|
||||
#iommu-cells = <0>;
|
||||
power-domains = <&power RK3576_PD_VOP>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hdmi: hdmi@27da0000 {
|
||||
compatible = "rockchip,rk3576-dw-hdmi-qp";
|
||||
reg = <0x0 0x27da0000 0x0 0x20000>;
|
||||
clocks = <&cru PCLK_HDMITX0>,
|
||||
<&cru CLK_HDMITX0_EARC>,
|
||||
<&cru CLK_HDMITX0_REF>,
|
||||
<&cru MCLK_SAI6_8CH>,
|
||||
<&cru CLK_HDMITXHDP>,
|
||||
<&cru HCLK_VO0_ROOT>;
|
||||
clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
||||
interrupts = <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 367 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
phys = <&hdptxphy>;
|
||||
phy-names = "hdmi";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_txm0_pins &hdmi_tx_scl &hdmi_tx_sda>;
|
||||
power-domains = <&power RK3576_PD_VO0>;
|
||||
resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMITXHDP>;
|
||||
reset-names = "ref", "hdp";
|
||||
rockchip,grf = <&ioc_grf>;
|
||||
rockchip,vo-grf = <&vo0_grf>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hdptxphy: hdmiphy@2b000000 {
|
||||
compatible = "rockchip,rk3576-hdptx-phy", "rockchip,rk3588-hdptx-phy";
|
||||
reg = <0x0 0x2b000000 0x0 0x2000>;
|
||||
clocks = <&cru CLK_PHY_REF_SRC>, <&cru PCLK_HDPTX_APB>;
|
||||
clock-names = "ref", "apb";
|
||||
#clock-cells = <0>;
|
||||
resets = <&cru SRST_P_HDPTX_APB>, <&cru SRST_HDPTX_INIT>,
|
||||
<&cru SRST_HDPTX_CMN>, <&cru SRST_HDPTX_LANE>;
|
||||
reset-names = "apb", "init", "cmn", "lane";
|
||||
rockchip,grf = <&hdptxphy_grf>;
|
||||
#phy-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
tsadc: tsadc@2ae70000 {
|
||||
compatible = "rockchip,rk3576-tsadc";
|
||||
reg = <0x0 0x2ae70000 0x0 0x400>;
|
||||
interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru CLK_TSADC>, <&cru PCLK_TSADC>;
|
||||
clock-names = "tsadc", "apb_pclk";
|
||||
assigned-clocks = <&cru CLK_TSADC>;
|
||||
assigned-clock-rates = <2000000>;
|
||||
resets = <&cru SRST_P_TSADC>, <&cru SRST_TSADC>;
|
||||
reset-names = "tsadc-apb", "tsadc";
|
||||
#thermal-sensor-cells = <1>;
|
||||
rockchip,hw-tshut-temp = <120000>;
|
||||
rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
|
||||
rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
tsadc@0 {
|
||||
reg = <0>;
|
||||
nvmem-cells = <&soc_tsadc_trim_l>, <&soc_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
tsadc@1 {
|
||||
reg = <1>;
|
||||
nvmem-cells = <&bigcore_tsadc_trim_l>, <&bigcore_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
tsadc@2 {
|
||||
reg = <2>;
|
||||
nvmem-cells = <&litcore_tsadc_trim_l>, <&litcore_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
tsadc@3 {
|
||||
reg = <3>;
|
||||
nvmem-cells = <&ddr_tsadc_trim_l>, <&ddr_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
tsadc@4 {
|
||||
reg = <4>;
|
||||
nvmem-cells = <&npu_tsadc_trim_l>, <&npu_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
tsadc@5 {
|
||||
reg = <5>;
|
||||
nvmem-cells = <&gpu_tsadc_trim_l>, <&gpu_tsadc_trim_h>;
|
||||
nvmem-cell-names = "trim_l", "trim_h";
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_2ch_0: pwm@27330000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x27330000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0m0_ch0>;
|
||||
clocks = <&cru CLK_PMU1PWM>, <&cru PCLK_PMU1PWM>;
|
||||
clock-names = "pwm", "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm0_2ch_1: pwm@27331000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x27331000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#pwm-cells = <3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0m0_ch1>;
|
||||
clocks = <&cru CLK_PMU1PWM>, <&cru PCLK_PMU1PWM>;
|
||||
clock-names = "pwm", "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_0: pwm@2add0000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add0000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch0>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_1: pwm@2add1000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add1000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch1>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_2: pwm@2add2000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add2000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch2>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_3: pwm@2add3000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add3000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch3>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_4: pwm@2add4000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add4000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch4>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm1_6ch_5: pwm@2add5000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2add5000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
clock-names = "pwm", "pclk", "osc";
|
||||
interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm1m0_ch5>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_0: pwm@2ade0000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade0000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch0>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_1: pwm@2ade1000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade1000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch1>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_2: pwm@2ade2000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade2000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch2>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_3: pwm@2ade3000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade3000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch3>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_4: pwm@2ade4000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade4000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch4>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_5: pwm@2ade5000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade5000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch5>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_6: pwm@2ade6000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade6000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch6>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm2_8ch_7: pwm@2ade7000 {
|
||||
compatible = "rockchip,rk3576-pwm";
|
||||
reg = <0x0 0x2ade7000 0x0 0x1000>;
|
||||
clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
clock-names = "pwm", "pclk";
|
||||
interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm2m0_ch7>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai0: sai@2a600000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x2a600000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI0_8CH>, <&cru HCLK_SAI0_8CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac0 0>, <&dmac0 1>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_AUDIO>;
|
||||
resets = <&cru SRST_M_SAI0_8CH>, <&cru SRST_H_SAI0_8CH>;
|
||||
reset-names = "m", "h";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sai0m0_lrck
|
||||
&sai0m0_sclk
|
||||
&sai0m0_sdi0
|
||||
&sai0m0_sdi1
|
||||
&sai0m0_sdi2
|
||||
&sai0m0_sdi3
|
||||
&sai0m0_sdo0
|
||||
&sai0m0_sdo1
|
||||
&sai0m0_sdo2
|
||||
&sai0m0_sdo3>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI0";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai1: sai@2a610000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x2a610000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI1_8CH>, <&cru HCLK_SAI1_8CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac0 2>, <&dmac0 3>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_AUDIO>;
|
||||
resets = <&cru SRST_M_SAI1_8CH>, <&cru SRST_H_SAI1_8CH>;
|
||||
reset-names = "m", "h";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sai1m0_lrck
|
||||
&sai1m0_sclk
|
||||
&sai1m0_sdi0
|
||||
&sai1m0_sdo0
|
||||
&sai1m0_sdo1
|
||||
&sai1m0_sdo2
|
||||
&sai1m0_sdo3>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI1";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai2: sai@2a620000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x2a620000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI2_2CH>, <&cru HCLK_SAI2_2CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac1 0>, <&dmac1 1>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_AUDIO>;
|
||||
resets = <&cru SRST_M_SAI2_2CH>, <&cru SRST_H_SAI2_2CH>;
|
||||
reset-names = "m", "h";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sai2m0_lrck
|
||||
&sai2m0_sclk
|
||||
&sai2m0_sdi
|
||||
&sai2m0_sdo>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI2";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai3: sai@2a630000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x2a630000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI3_2CH>, <&cru HCLK_SAI3_2CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac1 2>, <&dmac1 3>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_AUDIO>;
|
||||
resets = <&cru SRST_M_SAI3_2CH>, <&cru SRST_H_SAI3_2CH>;
|
||||
reset-names = "m", "h";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sai3m0_lrck
|
||||
&sai3m0_sclk
|
||||
&sai3m0_sdi
|
||||
&sai3m0_sdo>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI3";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai4: sai@2a640000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x2a640000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI4_2CH>, <&cru HCLK_SAI4_2CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac2 0>, <&dmac2 1>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_AUDIO>;
|
||||
resets = <&cru SRST_M_SAI4_2CH>, <&cru SRST_H_SAI4_2CH>;
|
||||
reset-names = "m", "h";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sai4m0_lrck
|
||||
&sai4m0_sclk
|
||||
&sai4m0_sdi
|
||||
&sai4m0_sdo>;
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI4";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai5: sai@27d40000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x27d40000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI5_8CH>, <&cru HCLK_SAI5_8CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac2 3>;
|
||||
dma-names = "rx";
|
||||
power-domains = <&power RK3576_PD_VO0>;
|
||||
resets = <&cru SRST_M_SAI5_8CH>, <&cru SRST_H_SAI5_8CH>;
|
||||
reset-names = "m", "h";
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI5";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sai6: sai@27d50000 {
|
||||
compatible = "rockchip,rk3576-sai";
|
||||
reg = <0x0 0x27d50000 0x0 0x1000>;
|
||||
interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru MCLK_SAI6_8CH>, <&cru HCLK_SAI6_8CH>;
|
||||
clock-names = "mclk", "hclk";
|
||||
dmas = <&dmac2 4>, <&dmac2 5>;
|
||||
dma-names = "tx", "rx";
|
||||
power-domains = <&power RK3576_PD_VO0>;
|
||||
resets = <&cru SRST_M_SAI6_8CH>, <&cru SRST_H_SAI6_8CH>;
|
||||
reset-names = "m", "h";
|
||||
#sound-dai-cells = <0>;
|
||||
sound-name-prefix = "SAI6";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&otp {
|
||||
bigcore_tsadc_trim_l: bigcore-tsadc-trim-l@24 {
|
||||
reg = <0x24 0x1>;
|
||||
};
|
||||
bigcore_tsadc_trim_h: bigcore-tsadc-trim-h@25 {
|
||||
reg = <0x25 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
litcore_tsadc_trim_l: litcore-tsadc-trim-l@26 {
|
||||
reg = <0x26 0x1>;
|
||||
};
|
||||
litcore_tsadc_trim_h: litcore-tsadc-trim-h@27 {
|
||||
reg = <0x27 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
ddr_tsadc_trim_l: ddr-tsadc-trim-l@28 {
|
||||
reg = <0x28 0x1>;
|
||||
};
|
||||
ddr_tsadc_trim_h: ddr-tsadc-trim-h@29 {
|
||||
reg = <0x29 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
npu_tsadc_trim_l: npu-tsadc-trim-l@2a {
|
||||
reg = <0x2a 0x1>;
|
||||
};
|
||||
npu_tsadc_trim_h: npu-tsadc-trim-h@2b {
|
||||
reg = <0x2b 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
gpu_tsadc_trim_l: gpu-tsadc-trim-l@2c {
|
||||
reg = <0x2c 0x1>;
|
||||
};
|
||||
gpu_tsadc_trim_h: gpu-tsadc-trim-h@2d {
|
||||
reg = <0x2d 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
soc_tsadc_trim_l: soc-tsadc-trim-l@64 {
|
||||
reg = <0x64 0x1>;
|
||||
};
|
||||
soc_tsadc_trim_h: soc-tsadc-trim-h@65 {
|
||||
reg = <0x65 0x1>;
|
||||
bits = <0 2>;
|
||||
};
|
||||
};
|
@@ -0,0 +1,956 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
/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/soc/rockchip,vop2.h>
|
||||
#include "rk3576.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R76S";
|
||||
compatible = "friendlyarm,nanopi-r76s", "rockchip,rk3576";
|
||||
|
||||
aliases {
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &sdio;
|
||||
|
||||
led-boot = &sys_led;
|
||||
led-failsafe = &sys_led;
|
||||
led-running = &sys_led;
|
||||
led-upgrade = &sys_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
stdout-path = "serial0:1500000n8";
|
||||
};
|
||||
|
||||
gpio_keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&reset_button_pin>;
|
||||
|
||||
button@1 {
|
||||
debounce-interval = <50>;
|
||||
gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi-con {
|
||||
compatible = "hdmi-connector";
|
||||
hdmi-pwr-supply = <&vcc_5v0_hdmi>;
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
sys_led: led-sys {
|
||||
gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
label = "red:power";
|
||||
linux,default-trigger = "heartbeat";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sys_led_pin>;
|
||||
};
|
||||
|
||||
wan_led: led-wan {
|
||||
gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||
label = "green:wan";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wan_led_pin>;
|
||||
};
|
||||
|
||||
lan_led: led-lan {
|
||||
gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
label = "green:lan";
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
usbc_vin0 {
|
||||
compatible = "iio-hwmon";
|
||||
io-channels = <&saradc 2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vcc5v0_usb_otg0: regulator-vcc5v0-usb-otg0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_usb_otg0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>;
|
||||
vin-supply = <&vcc5v0_device>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb_otg0_pwren_h>;
|
||||
};
|
||||
|
||||
vcc12v_dcin: regulator-vcc12v-dcin {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc12v_dcin";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <12000000>;
|
||||
regulator-max-microvolt = <12000000>;
|
||||
};
|
||||
|
||||
vcc1v2_ufs_vccq_s0: regulator-vcc1v2-ufs-vccq-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc1v2_ufs_vccq_s0";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc1v8_ufs_vccq2_s0: regulator-vcc1v8-ufs-vccq2-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc1v8_ufs_vccq2_s0";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_1v8_s3>;
|
||||
};
|
||||
|
||||
vcc3v3_pcie20: vcc3v3-pcie20 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_pcie20";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
clocks = <&hym8563>;
|
||||
clock-names = "ext_clock";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_reg_on>;
|
||||
post-power-on-delay-ms = <200>;
|
||||
reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
vcc3v3_rtc_s5: regulator-vcc3v3-rtc-s5 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_rtc_s5";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sd_s0_pwren>;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc_3v3_sd_s0";
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc5v0_device: regulator-vcc5v0-device {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_device";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc_sys: regulator-vcc5v0-sys {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc12v_dcin>;
|
||||
};
|
||||
|
||||
vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v1_nldo_s3";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_1v8_s0: regulator-vcc-1v8-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_1v8_s0";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
vin-supply = <&vcc_1v8_s3>;
|
||||
};
|
||||
|
||||
vcc_2v0_pldo_s3: regulator-vcc-2v0-pldo-s3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_2v0_pldo_s3";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2000000>;
|
||||
regulator-max-microvolt = <2000000>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
};
|
||||
|
||||
vcc_3v3_s0: regulator-vcc-3v3-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_3v3_s0";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_3v3_s3>;
|
||||
};
|
||||
|
||||
vcc_5v0_hdmi: regulator-vcc-5v0-hdmi {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmi_con_en>;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-name = "vcc_5v0_hdmi";
|
||||
vin-supply = <&vcc_sys>;
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_ufs_s0: regulator-vcc-ufs-s0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_ufs_s0";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc_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>;
|
||||
};
|
||||
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big_s0>;
|
||||
};
|
||||
|
||||
&combphy0_ps {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy1_psu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_in {
|
||||
hdmi_in_vp0: endpoint {
|
||||
remote-endpoint = <&vp0_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi_out {
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
|
||||
&hdptxphy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_sound {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sai6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
rk806: pmic@23 {
|
||||
compatible = "rockchip,rk806";
|
||||
reg = <0x23>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <6 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>;
|
||||
system-power-controller;
|
||||
|
||||
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 = <&vcc_sys>;
|
||||
vcc10-supply = <&vcc_sys>;
|
||||
vcc11-supply = <&vcc_2v0_pldo_s3>;
|
||||
vcc12-supply = <&vcc_sys>;
|
||||
vcc13-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcc14-supply = <&vcc_1v1_nldo_s3>;
|
||||
vcca-supply = <&vcc_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";
|
||||
};
|
||||
|
||||
rk806_dvs1_slp: dvs1-slp-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun1";
|
||||
};
|
||||
|
||||
rk806_dvs1_pwrdn: dvs1-pwrdn-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun2";
|
||||
};
|
||||
|
||||
rk806_dvs1_rst: dvs1-rst-pins {
|
||||
pins = "gpio_pwrctrl1";
|
||||
function = "pin_fun3";
|
||||
};
|
||||
|
||||
rk806_dvs2_slp: dvs2-slp-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun1";
|
||||
};
|
||||
|
||||
rk806_dvs2_pwrdn: dvs2-pwrdn-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun2";
|
||||
};
|
||||
|
||||
rk806_dvs2_rst: dvs2-rst-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun3";
|
||||
};
|
||||
|
||||
rk806_dvs2_dvs: dvs2-dvs-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun4";
|
||||
};
|
||||
|
||||
rk806_dvs2_gpio: dvs2-gpio-pins {
|
||||
pins = "gpio_pwrctrl2";
|
||||
function = "pin_fun5";
|
||||
};
|
||||
|
||||
rk806_dvs3_slp: dvs3-slp-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun1";
|
||||
};
|
||||
|
||||
rk806_dvs3_pwrdn: dvs3-pwrdn-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun2";
|
||||
};
|
||||
|
||||
rk806_dvs3_rst: dvs3-rst-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun3";
|
||||
};
|
||||
|
||||
rk806_dvs3_dvs: dvs3-dvs-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun4";
|
||||
};
|
||||
|
||||
rk806_dvs3_gpio: dvs3-gpio-pins {
|
||||
pins = "gpio_pwrctrl3";
|
||||
function = "pin_fun5";
|
||||
};
|
||||
|
||||
regulators {
|
||||
vdd_cpu_big_s0: dcdc-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_cpu_big_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_npu_s0: dcdc-reg2 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_npu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_cpu_lit_s0: dcdc-reg3 {
|
||||
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;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3_s3: dcdc-reg4 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_gpu_s0: dcdc-reg5 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_gpu_s0";
|
||||
regulator-enable-ramp-delay = <400>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
regulator-suspend-microvolt = <850000>;
|
||||
};
|
||||
};
|
||||
|
||||
vddq_ddr_s0: dcdc-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vddq_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_logic_s0: dcdc-reg7 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <800000>;
|
||||
regulator-name = "vdd_logic_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8_s3: dcdc-reg8 {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd2_ddr_s3: dcdc-reg9 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "vdd2_ddr_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_ddr_s0: dcdc-reg10 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "vdd_ddr_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca_1v8_s0: pldo-reg1 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcca_1v8_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_pldo2_s0: pldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcca1v8_pldo2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_1v2_s0: pldo-reg3 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "vdda_1v2_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca_3v3_s0: pldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcca_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-name = "vccio_sd_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_pldo6_s3: pldo-reg6 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcca1v8_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 = <550000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdd_0v75_s3";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <750000>;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_ddr_pll_s0: nldo-reg2 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdda_ddr_pll_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v75_hdmi_s0: nldo-reg3 {
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <837500>;
|
||||
regulator-max-microvolt = <837500>;
|
||||
regulator-name = "vdda0v75_hdmi_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_0v85_s0: nldo-reg4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <850000>;
|
||||
regulator-name = "vdda_0v85_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_0v75_s0: nldo-reg5 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <750000>;
|
||||
regulator-max-microvolt = <750000>;
|
||||
regulator-name = "vdda_0v75_s0";
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rtc_int_l>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie0_reset>;
|
||||
reset-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie20>;
|
||||
status = "okay";
|
||||
|
||||
pcie@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
rtl8125_1: pcie@1,0 {
|
||||
compatible = "pci10ec,8125";
|
||||
reg = <0x000000 0 0 0 0>;
|
||||
|
||||
realtek,led-data = <0x0 0x0 0x2b 0x200>;
|
||||
label = "eth0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie1_reset>;
|
||||
reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
vpcie3v3-supply = <&vcc3v3_pcie20>;
|
||||
status = "okay";
|
||||
|
||||
pcie@0,0 {
|
||||
reg = <0x00100000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
rtl8125_2: pcie@10,0 {
|
||||
compatible = "pci10ec,8125";
|
||||
reg = <0x000000 0 0 0 0>;
|
||||
|
||||
realtek,led-data = <0x0 0x0 0x2b 0x200>;
|
||||
label = "eth1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
gpio-key {
|
||||
reset_button_pin: reset-button-pin {
|
||||
rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
sys_led_pin: sys-led-pin {
|
||||
rockchip,pins = <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
lan_led_pin: lan-led-pin {
|
||||
rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
usb {
|
||||
usb3_host_pwren_h: usb3-host-pwren-h {
|
||||
rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
usb_otg0_pwren_h: usb-otg0-pwren-h {
|
||||
rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie {
|
||||
pcie0_reset: pcie0-reset {
|
||||
rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
pcie1_reset: pcie1-reset {
|
||||
rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
hym8563 {
|
||||
rtc_int_l: rtc-int-l {
|
||||
rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc {
|
||||
sd_s0_pwren: sd-s0-pwren {
|
||||
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
hdmi {
|
||||
hdmi_con_en: hdmi-con-en {
|
||||
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wireless-wlan {
|
||||
wifi_wake_host: wifi-wake-host {
|
||||
rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
|
||||
wifi_reg_on: wifi-reg-on {
|
||||
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
wireless-bluetooth {
|
||||
bt_reg_on: bt-reg-on {
|
||||
rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
host_wake_bt: host-wake-bt {
|
||||
rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
|
||||
bt_wake_host: bt-wake-host {
|
||||
rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc {
|
||||
max-frequency = <200000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_3v3_sd_s0>;
|
||||
vqmmc-supply = <&vccio_sd_s0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdio {
|
||||
max-frequency = <200000000>;
|
||||
no-sd;
|
||||
no-mmc;
|
||||
bus-width = <4>;
|
||||
disable-wp;
|
||||
cap-sd-highspeed;
|
||||
cap-sdio-irq;
|
||||
keep-power-in-suspend;
|
||||
mmc-pwrseq = <&sdio_pwrseq>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc1m0_bus4 &sdmmc1m0_clk &sdmmc1m0_cmd>;
|
||||
sd-uhs-sdr104;
|
||||
wakeup-source;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
no-sdio;
|
||||
no-sd;
|
||||
non-removable;
|
||||
max-frequency = <200000000>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
full-pwr-cycle-in-suspend;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
vref-supply = <&vcca_1v8_s0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&u2phy0_otg {
|
||||
phy-supply = <&vcc5v0_usb_otg0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart5 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart5m0_xfer &uart5m0_ctsn &uart5m0_rtsn>;
|
||||
status = "okay";
|
||||
|
||||
bluetooth {
|
||||
compatible = "realtek,rtl8822cs-bt";
|
||||
enable-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
|
||||
host-wake-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
|
||||
device-wake-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&usbdp_phy {
|
||||
rockchip,dp-lane-mux = <2 3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_drd0_dwc3 {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop {
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
&wdt {
|
||||
status= "okay";
|
||||
};
|
@@ -14,10 +14,9 @@
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3576.dtsi"
|
||||
#include "rk3576-extra.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Ariaboard photonicat2";
|
||||
model = "Ariaboard Photonicat 2";
|
||||
compatible = "ariaboard,photonicat2", "rockchip,rk3576";
|
||||
|
||||
aliases {
|
||||
|
@@ -24,7 +24,7 @@ TARGET_DEVICES += ariaboard_photonicat
|
||||
|
||||
define Device/ariaboard_photonicat2
|
||||
DEVICE_VENDOR := Ariaboard
|
||||
DEVICE_MODEL := Photonicat2
|
||||
DEVICE_MODEL := Photonicat 2
|
||||
SOC := rk3576
|
||||
DEVICE_DTS := rockchip/rk3576-photonicat2
|
||||
UBOOT_DEVICE_NAME := evb-rk3576
|
||||
@@ -274,6 +274,17 @@ define Device/friendlyarm_nanopi-r6s
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r6s
|
||||
|
||||
define Device/friendlyarm_nanopi-r76s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R76S
|
||||
SOC := rk3576
|
||||
DEVICE_DTS := rockchip/rk3576-nanopi-r76s
|
||||
UBOOT_DEVICE_NAME := evb-rk3576
|
||||
DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-r8125
|
||||
IMAGE/sysupgrade.img.gz := boot-common | boot-script rk3576 | pine64-img | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r76s
|
||||
|
||||
define Device/firefly_station-p2
|
||||
DEVICE_VENDOR := Firefly
|
||||
DEVICE_MODEL := Station P2
|
||||
|
@@ -0,0 +1,98 @@
|
||||
From 32a0fc710f946d0bd5081aa6bbf140dd128d8d32 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Yan <andy.yan@rock-chips.com>
|
||||
Date: Tue, 31 Dec 2024 17:57:18 +0800
|
||||
Subject: [PATCH 41/75] arm64: dts: rockchip: Add vop for rk3576
|
||||
|
||||
Add VOP and VOP_MMU found on rk3576.
|
||||
|
||||
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/20241231095728.253943-2-andyshrk@163.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 68 ++++++++++++++++++++++++
|
||||
1 file changed, 68 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -393,6 +393,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ display_subsystem: display-subsystem {
|
||||
+ compatible = "rockchip,display-subsystem";
|
||||
+ ports = <&vop_out>;
|
||||
+ };
|
||||
+
|
||||
firmware {
|
||||
scmi: scmi {
|
||||
compatible = "arm,scmi-smc";
|
||||
@@ -937,6 +942,69 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ vop: vop@27d00000 {
|
||||
+ compatible = "rockchip,rk3576-vop";
|
||||
+ reg = <0x0 0x27d00000 0x0 0x3000>, <0x0 0x27d05000 0x0 0x1000>;
|
||||
+ reg-names = "vop", "gamma-lut";
|
||||
+ interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 380 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 381 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "sys",
|
||||
+ "vp0",
|
||||
+ "vp1",
|
||||
+ "vp2";
|
||||
+ clocks = <&cru ACLK_VOP>,
|
||||
+ <&cru HCLK_VOP>,
|
||||
+ <&cru DCLK_VP0>,
|
||||
+ <&cru DCLK_VP1>,
|
||||
+ <&cru DCLK_VP2>;
|
||||
+ clock-names = "aclk",
|
||||
+ "hclk",
|
||||
+ "dclk_vp0",
|
||||
+ "dclk_vp1",
|
||||
+ "dclk_vp2";
|
||||
+ iommus = <&vop_mmu>;
|
||||
+ power-domains = <&power RK3576_PD_VOP>;
|
||||
+ rockchip,grf = <&sys_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>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vop_mmu: iommu@27d07e00 {
|
||||
+ compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu";
|
||||
+ reg = <0x0 0x27d07e00 0x0 0x100>, <0x0 0x27d07f00 0x0 0x100>;
|
||||
+ interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
|
||||
+ clock-names = "aclk", "iface";
|
||||
+ #iommu-cells = <0>;
|
||||
+ power-domains = <&power RK3576_PD_VOP>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
qos_hdcp1: qos@27f02000 {
|
||||
compatible = "rockchip,rk3576-qos", "syscon";
|
||||
reg = <0x0 0x27f02000 0x0 0x20>;
|
@@ -0,0 +1,95 @@
|
||||
From 9b2fa20fda167aa15770f53fba6da12fcd4d93a1 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Yan <andy.yan@rock-chips.com>
|
||||
Date: Tue, 31 Dec 2024 17:57:19 +0800
|
||||
Subject: [PATCH 42/75] arm64: dts: rockchip: Add hdmi for rk3576
|
||||
|
||||
Add hdmi and it's phy dt node for rk3576.
|
||||
|
||||
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/20241231095728.253943-3-andyshrk@163.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 58 ++++++++++++++++++++++++
|
||||
1 file changed, 58 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -625,6 +625,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ hdptxphy_grf: syscon@26032000 {
|
||||
+ compatible = "rockchip,rk3576-hdptxphy-grf", "syscon";
|
||||
+ reg = <0x0 0x26032000 0x0 0x100>;
|
||||
+ };
|
||||
+
|
||||
vo1_grf: syscon@26036000 {
|
||||
compatible = "rockchip,rk3576-vo1-grf", "syscon";
|
||||
reg = <0x0 0x26036000 0x0 0x100>;
|
||||
@@ -1005,6 +1010,46 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hdmi: hdmi@27da0000 {
|
||||
+ compatible = "rockchip,rk3576-dw-hdmi-qp";
|
||||
+ reg = <0x0 0x27da0000 0x0 0x20000>;
|
||||
+ clocks = <&cru PCLK_HDMITX0>,
|
||||
+ <&cru CLK_HDMITX0_EARC>,
|
||||
+ <&cru CLK_HDMITX0_REF>,
|
||||
+ <&cru MCLK_SAI6_8CH>,
|
||||
+ <&cru CLK_HDMITXHDP>,
|
||||
+ <&cru HCLK_VO0_ROOT>;
|
||||
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
||||
+ interrupts = <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 367 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
+ phys = <&hdptxphy>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmi_txm0_pins &hdmi_tx_scl &hdmi_tx_sda>;
|
||||
+ power-domains = <&power RK3576_PD_VO0>;
|
||||
+ resets = <&cru SRST_HDMITX0_REF>, <&cru SRST_HDMITXHDP>;
|
||||
+ reset-names = "ref", "hdp";
|
||||
+ rockchip,grf = <&ioc_grf>;
|
||||
+ rockchip,vo-grf = <&vo0_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ hdmi_in: port@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
qos_hdcp1: qos@27f02000 {
|
||||
compatible = "rockchip,rk3576-qos", "syscon";
|
||||
reg = <0x0 0x27f02000 0x0 0x20>;
|
||||
@@ -1887,6 +1932,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hdptxphy: hdmiphy@2b000000 {
|
||||
+ compatible = "rockchip,rk3576-hdptx-phy", "rockchip,rk3588-hdptx-phy";
|
||||
+ reg = <0x0 0x2b000000 0x0 0x2000>;
|
||||
+ clocks = <&cru CLK_PHY_REF_SRC>, <&cru PCLK_HDPTX_APB>;
|
||||
+ clock-names = "ref", "apb";
|
||||
+ resets = <&cru SRST_P_HDPTX_APB>, <&cru SRST_HDPTX_INIT>,
|
||||
+ <&cru SRST_HDPTX_CMN>, <&cru SRST_HDPTX_LANE>;
|
||||
+ reset-names = "apb", "init", "cmn", "lane";
|
||||
+ rockchip,grf = <&hdptxphy_grf>;
|
||||
+ #phy-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
sram: sram@3ff88000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x0 0x3ff88000 0x0 0x78000>;
|
@@ -0,0 +1,135 @@
|
||||
From 5712039aed02e19d13cf30c56e6963b6ec686e2e Mon Sep 17 00:00:00 2001
|
||||
From: Kever Yang <kever.yang@rock-chips.com>
|
||||
Date: Mon, 14 Apr 2025 22:51:10 +0800
|
||||
Subject: [PATCH 47/75] arm64: dts: rockchip: Add rk3576 pcie nodes
|
||||
|
||||
rk3576 has two pcie controllers, both are pcie2x1 work with
|
||||
naneng-combphy.
|
||||
|
||||
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
Tested-by: Shawn Lin <Shawn.lin@rock-chips.com>
|
||||
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20250414145110.11275-3-kever.yang@rock-chips.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 108 +++++++++++++++++++++++
|
||||
1 file changed, 108 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -1240,6 +1240,114 @@
|
||||
reg = <0x0 0x27f22100 0x0 0x20>;
|
||||
};
|
||||
|
||||
+ pcie0: pcie@2a200000 {
|
||||
+ compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
+ reg = <0x0 0x22000000 0x0 0x00400000>,
|
||||
+ <0x0 0x2a200000 0x0 0x00010000>,
|
||||
+ <0x0 0x20000000 0x0 0x00100000>;
|
||||
+ reg-names = "dbi", "apb", "config";
|
||||
+ bus-range = <0x0 0xf>;
|
||||
+ clocks = <&cru ACLK_PCIE0_MST>, <&cru ACLK_PCIE0_SLV>,
|
||||
+ <&cru ACLK_PCIE0_DBI>, <&cru PCLK_PCIE0>,
|
||||
+ <&cru CLK_PCIE0_AUX>;
|
||||
+ clock-names = "aclk_mst", "aclk_slv",
|
||||
+ "aclk_dbi", "pclk",
|
||||
+ "aux";
|
||||
+ device_type = "pci";
|
||||
+ interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-map-mask = <0 0 0 7>;
|
||||
+ interrupt-map = <0 0 0 1 &pcie0_intc 0>,
|
||||
+ <0 0 0 2 &pcie0_intc 1>,
|
||||
+ <0 0 0 3 &pcie0_intc 2>,
|
||||
+ <0 0 0 4 &pcie0_intc 3>;
|
||||
+ linux,pci-domain = <0>;
|
||||
+ max-link-speed = <2>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-viewport = <8>;
|
||||
+ num-ob-windows = <2>;
|
||||
+ num-lanes = <1>;
|
||||
+ phys = <&combphy0_ps PHY_TYPE_PCIE>;
|
||||
+ phy-names = "pcie-phy";
|
||||
+ power-domains = <&power RK3576_PD_PHP>;
|
||||
+ ranges = <0x01000000 0x0 0x20100000 0x0 0x20100000 0x0 0x00100000
|
||||
+ 0x02000000 0x0 0x20200000 0x0 0x20200000 0x0 0x00e00000
|
||||
+ 0x03000000 0x9 0x00000000 0x9 0x00000000 0x0 0x80000000>;
|
||||
+ resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
|
||||
+ reset-names = "pwr", "pipe";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ pcie0_intc: legacy-interrupt-controller {
|
||||
+ interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&gic>;
|
||||
+ interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie1: pcie@2a210000 {
|
||||
+ compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
+ reg = <0x0 0x22400000 0x0 0x00400000>,
|
||||
+ <0x0 0x2a210000 0x0 0x00010000>,
|
||||
+ <0x0 0x21000000 0x0 0x00100000>;
|
||||
+ reg-names = "dbi", "apb", "config";
|
||||
+ bus-range = <0x20 0x2f>;
|
||||
+ clocks = <&cru ACLK_PCIE1_MST>, <&cru ACLK_PCIE1_SLV>,
|
||||
+ <&cru ACLK_PCIE1_DBI>, <&cru PCLK_PCIE1>,
|
||||
+ <&cru CLK_PCIE1_AUX>;
|
||||
+ clock-names = "aclk_mst", "aclk_slv",
|
||||
+ "aclk_dbi", "pclk",
|
||||
+ "aux";
|
||||
+ device_type = "pci";
|
||||
+ interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-map-mask = <0 0 0 7>;
|
||||
+ interrupt-map = <0 0 0 1 &pcie1_intc 0>,
|
||||
+ <0 0 0 2 &pcie1_intc 1>,
|
||||
+ <0 0 0 3 &pcie1_intc 2>,
|
||||
+ <0 0 0 4 &pcie1_intc 3>;
|
||||
+ linux,pci-domain = <0>;
|
||||
+ max-link-speed = <2>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-viewport = <8>;
|
||||
+ num-ob-windows = <2>;
|
||||
+ num-lanes = <1>;
|
||||
+ phys = <&combphy1_psu PHY_TYPE_PCIE>;
|
||||
+ phy-names = "pcie-phy";
|
||||
+ power-domains = <&power RK3576_PD_SUBPHP>;
|
||||
+ ranges = <0x01000000 0x0 0x21100000 0x0 0x21100000 0x0 0x00100000
|
||||
+ 0x02000000 0x0 0x21200000 0x0 0x21200000 0x0 0x00e00000
|
||||
+ 0x03000000 0x9 0x80000000 0x9 0x80000000 0x0 0x80000000>;
|
||||
+ resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
|
||||
+ reset-names = "pwr", "pipe";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ pcie1_intc: legacy-interrupt-controller {
|
||||
+ interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&gic>;
|
||||
+ interrupts = <GIC_SPI 266 IRQ_TYPE_EDGE_RISING>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
gmac0: ethernet@2a220000 {
|
||||
compatible = "rockchip,rk3576-gmac", "snps,dwmac-4.20a";
|
||||
reg = <0x0 0x2a220000 0x0 0x10000>;
|
@@ -0,0 +1,243 @@
|
||||
From fbcc9ab6cf70d046c5f112aa9d4d90c924b50f5c Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Date: Tue, 6 May 2025 12:42:40 +0200
|
||||
Subject: [PATCH 66/75] arm64: dts: rockchip: Add RK3576 SAI nodes
|
||||
|
||||
The RK3576 SoC has 10 SAI controllers in total. Five of them are in the
|
||||
video output power domains, and are used for digital audio output along
|
||||
with the video signal of those, e.g. HDMI audio.
|
||||
|
||||
The other five, SAI0 through SAI4, are exposed externally. SAI0 and SAI1
|
||||
are capable of 8-channel audio, whereas SAI2, SAI3 and SAI4 are limited
|
||||
to two channels. These five are in the audio power domain.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-1-a8b5f5733ceb@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 200 +++++++++++++++++++++++
|
||||
1 file changed, 200 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -1010,6 +1010,41 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ sai5: sai@27d40000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x27d40000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI5_8CH>, <&cru HCLK_SAI5_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac2 3>;
|
||||
+ dma-names = "rx";
|
||||
+ power-domains = <&power RK3576_PD_VO0>;
|
||||
+ resets = <&cru SRST_M_SAI5_8CH>, <&cru SRST_H_SAI5_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ rockchip,sai-rx-route = <0 1 2 3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI5";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai6: sai@27d50000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x27d50000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI6_8CH>, <&cru HCLK_SAI6_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac2 4>, <&dmac2 5>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_VO0>;
|
||||
+ resets = <&cru SRST_M_SAI6_8CH>, <&cru SRST_H_SAI6_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ rockchip,sai-rx-route = <0 1 2 3>;
|
||||
+ rockchip,sai-tx-route = <0 1 2 3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI6";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
hdmi: hdmi@27da0000 {
|
||||
compatible = "rockchip,rk3576-dw-hdmi-qp";
|
||||
reg = <0x0 0x27da0000 0x0 0x20000>;
|
||||
@@ -1050,6 +1085,57 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ sai7: sai@27ed0000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x27ed0000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI7_8CH>, <&cru HCLK_SAI7_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac2 19>;
|
||||
+ dma-names = "tx";
|
||||
+ power-domains = <&power RK3576_PD_VO1>;
|
||||
+ resets = <&cru SRST_M_SAI7_8CH>, <&cru SRST_H_SAI7_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ rockchip,sai-tx-route = <0 1 2 3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI7";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai8: sai@27ee0000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x27ee0000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI8_8CH>, <&cru HCLK_SAI8_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac1 7>;
|
||||
+ dma-names = "tx";
|
||||
+ power-domains = <&power RK3576_PD_VO1>;
|
||||
+ resets = <&cru SRST_M_SAI8_8CH>, <&cru SRST_H_SAI8_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ rockchip,sai-tx-route = <0 1 2 3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI8";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai9: sai@27ef0000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x27ef0000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI9_8CH>, <&cru HCLK_SAI9_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac0 26>;
|
||||
+ dma-names = "tx";
|
||||
+ power-domains = <&power RK3576_PD_VO1>;
|
||||
+ resets = <&cru SRST_M_SAI9_8CH>, <&cru SRST_H_SAI9_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ rockchip,sai-tx-route = <0 1 2 3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI9";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
qos_hdcp1: qos@27f02000 {
|
||||
compatible = "rockchip,rk3576-qos", "syscon";
|
||||
reg = <0x0 0x27f02000 0x0 0x20>;
|
||||
@@ -1604,6 +1690,120 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ sai0: sai@2a600000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x2a600000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI0_8CH>, <&cru HCLK_SAI0_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac0 0>, <&dmac0 1>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_AUDIO>;
|
||||
+ resets = <&cru SRST_M_SAI0_8CH>, <&cru SRST_H_SAI0_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sai0m0_lrck
|
||||
+ &sai0m0_sclk
|
||||
+ &sai0m0_sdi0
|
||||
+ &sai0m0_sdi1
|
||||
+ &sai0m0_sdi2
|
||||
+ &sai0m0_sdi3
|
||||
+ &sai0m0_sdo0
|
||||
+ &sai0m0_sdo1
|
||||
+ &sai0m0_sdo2
|
||||
+ &sai0m0_sdo3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI0";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai1: sai@2a610000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x2a610000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI1_8CH>, <&cru HCLK_SAI1_8CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac0 2>, <&dmac0 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_AUDIO>;
|
||||
+ resets = <&cru SRST_M_SAI1_8CH>, <&cru SRST_H_SAI1_8CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sai1m0_lrck
|
||||
+ &sai1m0_sclk
|
||||
+ &sai1m0_sdi0
|
||||
+ &sai1m0_sdo0
|
||||
+ &sai1m0_sdo1
|
||||
+ &sai1m0_sdo2
|
||||
+ &sai1m0_sdo3>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI1";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai2: sai@2a620000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x2a620000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI2_2CH>, <&cru HCLK_SAI2_2CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac1 0>, <&dmac1 1>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_AUDIO>;
|
||||
+ resets = <&cru SRST_M_SAI2_2CH>, <&cru SRST_H_SAI2_2CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sai2m0_lrck
|
||||
+ &sai2m0_sclk
|
||||
+ &sai2m0_sdi
|
||||
+ &sai2m0_sdo>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI2";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai3: sai@2a630000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x2a630000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI3_2CH>, <&cru HCLK_SAI3_2CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac1 2>, <&dmac1 3>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_AUDIO>;
|
||||
+ resets = <&cru SRST_M_SAI3_2CH>, <&cru SRST_H_SAI3_2CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sai3m0_lrck
|
||||
+ &sai3m0_sclk
|
||||
+ &sai3m0_sdi
|
||||
+ &sai3m0_sdo>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI3";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ sai4: sai@2a640000 {
|
||||
+ compatible = "rockchip,rk3576-sai";
|
||||
+ reg = <0x0 0x2a640000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru MCLK_SAI4_2CH>, <&cru HCLK_SAI4_2CH>;
|
||||
+ clock-names = "mclk", "hclk";
|
||||
+ dmas = <&dmac2 0>, <&dmac2 1>;
|
||||
+ dma-names = "tx", "rx";
|
||||
+ power-domains = <&power RK3576_PD_AUDIO>;
|
||||
+ resets = <&cru SRST_M_SAI4_2CH>, <&cru SRST_H_SAI4_2CH>;
|
||||
+ reset-names = "m", "h";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sai4m0_lrck
|
||||
+ &sai4m0_sclk
|
||||
+ &sai4m0_sdi
|
||||
+ &sai4m0_sdo>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "SAI4";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
gic: interrupt-controller@2a701000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x0 0x2a701000 0 0x10000>,
|
@@ -0,0 +1,50 @@
|
||||
From cb28aa830204ac64f3fd916cab46a1f6fd3834ce Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Date: Tue, 6 May 2025 12:42:41 +0200
|
||||
Subject: [PATCH 67/75] arm64: dts: rockchip: Add RK3576 HDMI audio
|
||||
|
||||
The RK3576 SoC now has upstream support for HDMI.
|
||||
|
||||
Add an HDMI audio node, which uses SAI6 as its audio controller
|
||||
according to downstream.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Link: https://lore.kernel.org/r/20250506-rk3576-sai-v4-2-a8b5f5733ceb@collabora.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -413,6 +413,22 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ hdmi_sound: hdmi-sound {
|
||||
+ compatible = "simple-audio-card";
|
||||
+ simple-audio-card,name = "HDMI";
|
||||
+ simple-audio-card,format = "i2s";
|
||||
+ simple-audio-card,mclk-fs = <256>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ simple-audio-card,codec {
|
||||
+ sound-dai = <&hdmi>;
|
||||
+ };
|
||||
+
|
||||
+ simple-audio-card,cpu {
|
||||
+ sound-dai = <&sai6>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pmu_a53: pmu-a53 {
|
||||
compatible = "arm,cortex-a53-pmu";
|
||||
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -1069,6 +1085,7 @@
|
||||
reset-names = "ref", "hdp";
|
||||
rockchip,grf = <&ioc_grf>;
|
||||
rockchip,vo-grf = <&vo0_grf>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
@@ -0,0 +1,257 @@
|
||||
From 21c8255aaea87b2098b20f45e335a0d544c42ad6 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko@sntech.de>
|
||||
Date: Mon, 19 May 2025 00:04:43 +0200
|
||||
Subject: [PATCH 70/75] arm64: dts: rockchip: fix rk3576 pcie unit addresses
|
||||
|
||||
The rk3576 pcie nodes currently use the apb register as their unit address
|
||||
which is the second reg area defined in the binding.
|
||||
|
||||
As can be seen by the dtc warnings like
|
||||
|
||||
../arch/arm64/boot/dts/rockchip/rk3576.dtsi:1346.24-1398.5: Warning (simple_bus_reg): /soc/pcie@2a200000: simple-bus unit address format error, expected "22000000"
|
||||
../arch/arm64/boot/dts/rockchip/rk3576.dtsi:1400.24-1452.5: Warning (simple_bus_reg): /soc/pcie@2a210000: simple-bus unit address format error, expected "22400000"
|
||||
|
||||
using the first reg area as the unit address seems to be preferred.
|
||||
This is the dbi area per the binding, so adapt the unit address accordingly
|
||||
and move the nodes to their new position.
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Closes: https://lore.kernel.org/oe-kbuild-all/202505150745.PQT9TLYX-lkp@intel.com/
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
Link: https://lore.kernel.org/r/20250518220449.2722673-2-heiko@sntech.de
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 216 +++++++++++------------
|
||||
1 file changed, 108 insertions(+), 108 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -466,6 +466,114 @@
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
+ pcie0: pcie@22000000 {
|
||||
+ compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
+ reg = <0x0 0x22000000 0x0 0x00400000>,
|
||||
+ <0x0 0x2a200000 0x0 0x00010000>,
|
||||
+ <0x0 0x20000000 0x0 0x00100000>;
|
||||
+ reg-names = "dbi", "apb", "config";
|
||||
+ bus-range = <0x0 0xf>;
|
||||
+ clocks = <&cru ACLK_PCIE0_MST>, <&cru ACLK_PCIE0_SLV>,
|
||||
+ <&cru ACLK_PCIE0_DBI>, <&cru PCLK_PCIE0>,
|
||||
+ <&cru CLK_PCIE0_AUX>;
|
||||
+ clock-names = "aclk_mst", "aclk_slv",
|
||||
+ "aclk_dbi", "pclk",
|
||||
+ "aux";
|
||||
+ device_type = "pci";
|
||||
+ interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-map-mask = <0 0 0 7>;
|
||||
+ interrupt-map = <0 0 0 1 &pcie0_intc 0>,
|
||||
+ <0 0 0 2 &pcie0_intc 1>,
|
||||
+ <0 0 0 3 &pcie0_intc 2>,
|
||||
+ <0 0 0 4 &pcie0_intc 3>;
|
||||
+ linux,pci-domain = <0>;
|
||||
+ max-link-speed = <2>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-viewport = <8>;
|
||||
+ num-ob-windows = <2>;
|
||||
+ num-lanes = <1>;
|
||||
+ phys = <&combphy0_ps PHY_TYPE_PCIE>;
|
||||
+ phy-names = "pcie-phy";
|
||||
+ power-domains = <&power RK3576_PD_PHP>;
|
||||
+ ranges = <0x01000000 0x0 0x20100000 0x0 0x20100000 0x0 0x00100000
|
||||
+ 0x02000000 0x0 0x20200000 0x0 0x20200000 0x0 0x00e00000
|
||||
+ 0x03000000 0x9 0x00000000 0x9 0x00000000 0x0 0x80000000>;
|
||||
+ resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
|
||||
+ reset-names = "pwr", "pipe";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ pcie0_intc: legacy-interrupt-controller {
|
||||
+ interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&gic>;
|
||||
+ interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie1: pcie@22400000 {
|
||||
+ compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
+ reg = <0x0 0x22400000 0x0 0x00400000>,
|
||||
+ <0x0 0x2a210000 0x0 0x00010000>,
|
||||
+ <0x0 0x21000000 0x0 0x00100000>;
|
||||
+ reg-names = "dbi", "apb", "config";
|
||||
+ bus-range = <0x20 0x2f>;
|
||||
+ clocks = <&cru ACLK_PCIE1_MST>, <&cru ACLK_PCIE1_SLV>,
|
||||
+ <&cru ACLK_PCIE1_DBI>, <&cru PCLK_PCIE1>,
|
||||
+ <&cru CLK_PCIE1_AUX>;
|
||||
+ clock-names = "aclk_mst", "aclk_slv",
|
||||
+ "aclk_dbi", "pclk",
|
||||
+ "aux";
|
||||
+ device_type = "pci";
|
||||
+ interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-map-mask = <0 0 0 7>;
|
||||
+ interrupt-map = <0 0 0 1 &pcie1_intc 0>,
|
||||
+ <0 0 0 2 &pcie1_intc 1>,
|
||||
+ <0 0 0 3 &pcie1_intc 2>,
|
||||
+ <0 0 0 4 &pcie1_intc 3>;
|
||||
+ linux,pci-domain = <0>;
|
||||
+ max-link-speed = <2>;
|
||||
+ num-ib-windows = <8>;
|
||||
+ num-viewport = <8>;
|
||||
+ num-ob-windows = <2>;
|
||||
+ num-lanes = <1>;
|
||||
+ phys = <&combphy1_psu PHY_TYPE_PCIE>;
|
||||
+ phy-names = "pcie-phy";
|
||||
+ power-domains = <&power RK3576_PD_SUBPHP>;
|
||||
+ ranges = <0x01000000 0x0 0x21100000 0x0 0x21100000 0x0 0x00100000
|
||||
+ 0x02000000 0x0 0x21200000 0x0 0x21200000 0x0 0x00e00000
|
||||
+ 0x03000000 0x9 0x80000000 0x9 0x80000000 0x0 0x80000000>;
|
||||
+ resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
|
||||
+ reset-names = "pwr", "pipe";
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ pcie1_intc: legacy-interrupt-controller {
|
||||
+ interrupt-controller;
|
||||
+ #address-cells = <0>;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&gic>;
|
||||
+ interrupts = <GIC_SPI 266 IRQ_TYPE_EDGE_RISING>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
usb_drd0_dwc3: usb@23000000 {
|
||||
compatible = "rockchip,rk3576-dwc3", "snps,dwc3";
|
||||
reg = <0x0 0x23000000 0x0 0x400000>;
|
||||
@@ -1343,114 +1451,6 @@
|
||||
reg = <0x0 0x27f22100 0x0 0x20>;
|
||||
};
|
||||
|
||||
- pcie0: pcie@2a200000 {
|
||||
- compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
- reg = <0x0 0x22000000 0x0 0x00400000>,
|
||||
- <0x0 0x2a200000 0x0 0x00010000>,
|
||||
- <0x0 0x20000000 0x0 0x00100000>;
|
||||
- reg-names = "dbi", "apb", "config";
|
||||
- bus-range = <0x0 0xf>;
|
||||
- clocks = <&cru ACLK_PCIE0_MST>, <&cru ACLK_PCIE0_SLV>,
|
||||
- <&cru ACLK_PCIE0_DBI>, <&cru PCLK_PCIE0>,
|
||||
- <&cru CLK_PCIE0_AUX>;
|
||||
- clock-names = "aclk_mst", "aclk_slv",
|
||||
- "aclk_dbi", "pclk",
|
||||
- "aux";
|
||||
- device_type = "pci";
|
||||
- interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
- #interrupt-cells = <1>;
|
||||
- interrupt-map-mask = <0 0 0 7>;
|
||||
- interrupt-map = <0 0 0 1 &pcie0_intc 0>,
|
||||
- <0 0 0 2 &pcie0_intc 1>,
|
||||
- <0 0 0 3 &pcie0_intc 2>,
|
||||
- <0 0 0 4 &pcie0_intc 3>;
|
||||
- linux,pci-domain = <0>;
|
||||
- max-link-speed = <2>;
|
||||
- num-ib-windows = <8>;
|
||||
- num-viewport = <8>;
|
||||
- num-ob-windows = <2>;
|
||||
- num-lanes = <1>;
|
||||
- phys = <&combphy0_ps PHY_TYPE_PCIE>;
|
||||
- phy-names = "pcie-phy";
|
||||
- power-domains = <&power RK3576_PD_PHP>;
|
||||
- ranges = <0x01000000 0x0 0x20100000 0x0 0x20100000 0x0 0x00100000
|
||||
- 0x02000000 0x0 0x20200000 0x0 0x20200000 0x0 0x00e00000
|
||||
- 0x03000000 0x9 0x00000000 0x9 0x00000000 0x0 0x80000000>;
|
||||
- resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
|
||||
- reset-names = "pwr", "pipe";
|
||||
- #address-cells = <3>;
|
||||
- #size-cells = <2>;
|
||||
- status = "disabled";
|
||||
-
|
||||
- pcie0_intc: legacy-interrupt-controller {
|
||||
- interrupt-controller;
|
||||
- #address-cells = <0>;
|
||||
- #interrupt-cells = <1>;
|
||||
- interrupt-parent = <&gic>;
|
||||
- interrupts = <GIC_SPI 280 IRQ_TYPE_EDGE_RISING>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- pcie1: pcie@2a210000 {
|
||||
- compatible = "rockchip,rk3576-pcie", "rockchip,rk3568-pcie";
|
||||
- reg = <0x0 0x22400000 0x0 0x00400000>,
|
||||
- <0x0 0x2a210000 0x0 0x00010000>,
|
||||
- <0x0 0x21000000 0x0 0x00100000>;
|
||||
- reg-names = "dbi", "apb", "config";
|
||||
- bus-range = <0x20 0x2f>;
|
||||
- clocks = <&cru ACLK_PCIE1_MST>, <&cru ACLK_PCIE1_SLV>,
|
||||
- <&cru ACLK_PCIE1_DBI>, <&cru PCLK_PCIE1>,
|
||||
- <&cru CLK_PCIE1_AUX>;
|
||||
- clock-names = "aclk_mst", "aclk_slv",
|
||||
- "aclk_dbi", "pclk",
|
||||
- "aux";
|
||||
- device_type = "pci";
|
||||
- interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-names = "sys", "pmc", "msg", "legacy", "err", "msi";
|
||||
- #interrupt-cells = <1>;
|
||||
- interrupt-map-mask = <0 0 0 7>;
|
||||
- interrupt-map = <0 0 0 1 &pcie1_intc 0>,
|
||||
- <0 0 0 2 &pcie1_intc 1>,
|
||||
- <0 0 0 3 &pcie1_intc 2>,
|
||||
- <0 0 0 4 &pcie1_intc 3>;
|
||||
- linux,pci-domain = <0>;
|
||||
- max-link-speed = <2>;
|
||||
- num-ib-windows = <8>;
|
||||
- num-viewport = <8>;
|
||||
- num-ob-windows = <2>;
|
||||
- num-lanes = <1>;
|
||||
- phys = <&combphy1_psu PHY_TYPE_PCIE>;
|
||||
- phy-names = "pcie-phy";
|
||||
- power-domains = <&power RK3576_PD_SUBPHP>;
|
||||
- ranges = <0x01000000 0x0 0x21100000 0x0 0x21100000 0x0 0x00100000
|
||||
- 0x02000000 0x0 0x21200000 0x0 0x21200000 0x0 0x00e00000
|
||||
- 0x03000000 0x9 0x80000000 0x9 0x80000000 0x0 0x80000000>;
|
||||
- resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
|
||||
- reset-names = "pwr", "pipe";
|
||||
- #address-cells = <3>;
|
||||
- #size-cells = <2>;
|
||||
- status = "disabled";
|
||||
-
|
||||
- pcie1_intc: legacy-interrupt-controller {
|
||||
- interrupt-controller;
|
||||
- #address-cells = <0>;
|
||||
- #interrupt-cells = <1>;
|
||||
- interrupt-parent = <&gic>;
|
||||
- interrupts = <GIC_SPI 266 IRQ_TYPE_EDGE_RISING>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
gmac0: ethernet@2a220000 {
|
||||
compatible = "rockchip,rk3576-gmac", "snps,dwmac-4.20a";
|
||||
reg = <0x0 0x2a220000 0x0 0x10000>;
|
@@ -0,0 +1,32 @@
|
||||
From 94cee2066340d3cda16df9596061fd16ef930cb3 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Date: Tue, 3 Jun 2025 10:35:40 +0800
|
||||
Subject: [PATCH 73/75] arm64: dts: rockchip: fix rk3576 pcie1 linux,pci-domain
|
||||
|
||||
pcie0 already used 0 as its pci-domain, so pcie1 will fail to
|
||||
allocate the same pci-domain if both of them are used.
|
||||
|
||||
rk-pcie 2a210000.pcie: PCIe Link up, LTSSM is 0x130011
|
||||
rk-pcie 2a210000.pcie: PCIe Gen.2 x1 link up
|
||||
rk-pcie 2a210000.pcie: Scanning root bridge failed
|
||||
rk-pcie 2a210000.pcie: failed to initialize host
|
||||
|
||||
Fixes: d4b9fc2af45d ("arm64: dts: rockchip: Add rk3576 pcie nodes")
|
||||
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/1748918140-212263-1-git-send-email-shawn.lin@rock-chips.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -615,7 +615,7 @@
|
||||
<0 0 0 2 &pcie1_intc 1>,
|
||||
<0 0 0 3 &pcie1_intc 2>,
|
||||
<0 0 0 4 &pcie1_intc 3>;
|
||||
- linux,pci-domain = <0>;
|
||||
+ linux,pci-domain = <1>;
|
||||
max-link-speed = <2>;
|
||||
num-ib-windows = <8>;
|
||||
num-viewport = <8>;
|
@@ -0,0 +1,35 @@
|
||||
From c8224fac4bbf1602bb08a6d473a186df258084d7 Mon Sep 17 00:00:00 2001
|
||||
From: sbwml <admin@cooluc.com>
|
||||
Date: Sat, 19 Jul 2025 18:31:51 +0800
|
||||
Subject: [PATCH 74/75] arm64: dts: rockchip: add RK3576 sdio node
|
||||
|
||||
Signed-off-by: sbwml <admin@cooluc.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -1695,6 +1695,22 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ sdio: mmc@2a320000 {
|
||||
+ compatible = "rockchip,rk3576-dw-mshc";
|
||||
+ reg = <0x0 0x2a320000 0x0 0x4000>;
|
||||
+ clocks = <&cru HCLK_SDIO>, <&cru CCLK_SRC_SDIO>;
|
||||
+ clock-names = "biu", "ciu";
|
||||
+ fifo-depth = <0x100>;
|
||||
+ interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ pinctrl-0 = <&sdmmc1m0_clk &sdmmc1m0_cmd &sdmmc1m0_bus4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ power-domains = <&power RK3576_PD_SDGMAC>;
|
||||
+ resets = <&cru SRST_H_SDIO>;
|
||||
+ reset-names = "reset";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
sdhci: mmc@2a330000 {
|
||||
compatible = "rockchip,rk3576-dwcmshc", "rockchip,rk3588-dwcmshc";
|
||||
reg = <0x0 0x2a330000 0x0 0x10000>;
|
@@ -0,0 +1,222 @@
|
||||
The RK3576 SoC features three distinct PWM controllers, with variable
|
||||
numbers of channels. Add each channel as a separate node to the SoC's
|
||||
device tree, as they don't really overlap in register ranges.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 192 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 192 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
index ebb5fc8bb8b1363127b9d3782801c4a79b678a92..b6ba1d5569b3d961707b182eb5f960939de67c84 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -809,6 +809,30 @@
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ pwm0_2ch_0: pwm@...30000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x27330000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm0m0_ch0>;
|
||||
+ clocks = <&cru CLK_PMU1PWM>, <&cru PCLK_PMU1PWM>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm0_2ch_1: pwm@...31000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x27331000 0x0 0x1000>;
|
||||
+ interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm0m0_ch1>;
|
||||
+ clocks = <&cru CLK_PMU1PWM>, <&cru PCLK_PMU1PWM>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
|
||||
uart1: serial@27310000 {
|
||||
compatible = "rockchip,rk3576-uart", "snps,dw-apb-uart";
|
||||
@@ -2179,6 +2203,174 @@
|
||||
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-0 = <&uart9m0_xfer>;
|
||||
pinctrl-names = "default";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_0: pwm@...d0000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add0000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch0>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_1: pwm@...d1000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add1000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch1>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_2: pwm@...d2000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add2000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch2>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_3: pwm@...d3000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add3000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch3>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_4: pwm@...d4000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add4000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch4>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm1_6ch_5: pwm@...d5000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2add5000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>, <&cru CLK_OSC_PWM1>;
|
||||
+ clock-names = "pwm", "pclk", "osc";
|
||||
+ interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm1m0_ch5>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_0: pwm@...e0000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade0000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch0>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_1: pwm@...e1000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade1000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch1>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_2: pwm@...e2000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade2000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch2>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_3: pwm@...e3000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade3000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch3>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_4: pwm@...e4000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade4000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch4>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_5: pwm@...e5000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade5000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch5>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_6: pwm@...e6000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade6000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch6>;
|
||||
+ #pwm-cells = <3>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ pwm2_8ch_7: pwm@...e7000 {
|
||||
+ compatible = "rockchip,rk3576-pwm";
|
||||
+ reg = <0x0 0x2ade7000 0x0 0x1000>;
|
||||
+ clocks = <&cru CLK_PWM2>, <&cru PCLK_PWM2>;
|
||||
+ clock-names = "pwm", "pclk";
|
||||
+ interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pwm2m0_ch7>;
|
||||
+ #pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
2.49.0
|
@@ -0,0 +1,83 @@
|
||||
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
|
||||
[ported to mainline, reworded commit message]
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
---
|
||||
drivers/thermal/rockchip_thermal.c | 42 ++++++++++++++++++++++++++++++
|
||||
Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml | 1 +
|
||||
2 file changed, 43 insertions(+)
|
||||
|
||||
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
|
||||
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
|
||||
@@ -21,6 +21,7 @@
|
||||
- rockchip,rk3368-tsadc
|
||||
- rockchip,rk3399-tsadc
|
||||
- rockchip,rk3568-tsadc
|
||||
+ - rockchip,rk3576-tsadc
|
||||
- rockchip,rk3588-tsadc
|
||||
- rockchip,rv1108-tsadc
|
||||
|
||||
--- a/drivers/thermal/rockchip_thermal.c
|
||||
+++ b/drivers/thermal/rockchip_thermal.c
|
||||
@@ -1061,6 +1061,22 @@ static void rk_tsadcv3_tshut_mode(int ch
|
||||
writel_relaxed(val_cru, regs + TSADCV3_HSHUT_CRU_INT_EN);
|
||||
}
|
||||
|
||||
+static void rk_tsadcv4_tshut_mode(int chn, void __iomem *regs,
|
||||
+ enum tshut_mode mode)
|
||||
+{
|
||||
+ u32 val_gpio, val_cru;
|
||||
+
|
||||
+ if (mode == TSHUT_MODE_GPIO) {
|
||||
+ val_gpio = TSADCV2_INT_SRC_EN(chn) | TSADCV2_INT_SRC_EN_MASK(chn);
|
||||
+ val_cru = TSADCV2_INT_SRC_EN_MASK(chn);
|
||||
+ } else {
|
||||
+ val_cru = TSADCV2_INT_SRC_EN(chn) | TSADCV2_INT_SRC_EN_MASK(chn);
|
||||
+ val_gpio = TSADCV2_INT_SRC_EN_MASK(chn);
|
||||
+ }
|
||||
+ writel_relaxed(val_gpio, regs + TSADCV3_HSHUT_GPIO_INT_EN);
|
||||
+ writel_relaxed(val_cru, regs + TSADCV3_HSHUT_CRU_INT_EN);
|
||||
+}
|
||||
+
|
||||
static const struct rockchip_tsadc_chip px30_tsadc_data = {
|
||||
/* cpu, gpu */
|
||||
.chn_offset = 0,
|
||||
@@ -1284,6 +1300,28 @@ static const struct rockchip_tsadc_chip
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct rockchip_tsadc_chip rk3576_tsadc_data = {
|
||||
+ /* top, big_core, little_core, ddr, npu, gpu */
|
||||
+ .chn_offset = 0,
|
||||
+ .chn_num = 6, /* six channels for tsadc */
|
||||
+ .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give PMIC */
|
||||
+ .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */
|
||||
+ .tshut_temp = 95000,
|
||||
+ .initialize = rk_tsadcv8_initialize,
|
||||
+ .irq_ack = rk_tsadcv4_irq_ack,
|
||||
+ .control = rk_tsadcv4_control,
|
||||
+ .get_temp = rk_tsadcv4_get_temp,
|
||||
+ .set_alarm_temp = rk_tsadcv3_alarm_temp,
|
||||
+ .set_tshut_temp = rk_tsadcv3_tshut_temp,
|
||||
+ .set_tshut_mode = rk_tsadcv4_tshut_mode,
|
||||
+ .table = {
|
||||
+ .id = rk3588_code_table,
|
||||
+ .length = ARRAY_SIZE(rk3588_code_table),
|
||||
+ .data_mask = TSADCV4_DATA_MASK,
|
||||
+ .mode = ADC_INCREMENT,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct rockchip_tsadc_chip rk3588_tsadc_data = {
|
||||
/* top, big_core0, big_core1, little_core, center, gpu, npu */
|
||||
.chn_offset = 0,
|
||||
@@ -1343,6 +1381,10 @@ static const struct of_device_id of_rock
|
||||
.data = (void *)&rk3568_tsadc_data,
|
||||
},
|
||||
{
|
||||
+ .compatible = "rockchip,rk3576-tsadc",
|
||||
+ .data = (void *)&rk3576_tsadc_data,
|
||||
+ },
|
||||
+ {
|
||||
.compatible = "rockchip,rk3588-tsadc",
|
||||
.data = (void *)&rk3588_tsadc_data,
|
||||
},
|
@@ -0,0 +1,264 @@
|
||||
From 9e1942cc352cc9a697e37d64459616bd920f2eda Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Date: Tue, 25 Feb 2025 13:56:45 +0100
|
||||
Subject: [PATCH 1/4] arm64: dts: rockchip: Add thermal nodes to RK3576
|
||||
|
||||
Add the TSADC node to the RK3576. Additionally, add everything the TSADC
|
||||
needs to function, i.e. thermal zones, their trip points and maps, as
|
||||
well as adjust the CPU cooling-cells property.
|
||||
|
||||
The polling-delay properties are set to 0 as we do have interrupts for
|
||||
this TSADC on this particular SoC.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 164 ++++++++++++++++++++++-
|
||||
1 file changed, 162 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <dt-bindings/power/rockchip,rk3576-power.h>
|
||||
#include <dt-bindings/reset/rockchip,rk3576-cru.h>
|
||||
#include <dt-bindings/soc/rockchip,boot-mode.h>
|
||||
+#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
/ {
|
||||
compatible = "rockchip,rk3576";
|
||||
@@ -113,9 +114,9 @@
|
||||
capacity-dmips-mhz = <485>;
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_L>;
|
||||
operating-points-v2 = <&cluster0_opp_table>;
|
||||
- #cooling-cells = <2>;
|
||||
dynamic-power-coefficient = <120>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_l1: cpu@1 {
|
||||
@@ -127,6 +128,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_L>;
|
||||
operating-points-v2 = <&cluster0_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_l2: cpu@2 {
|
||||
@@ -138,6 +140,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_L>;
|
||||
operating-points-v2 = <&cluster0_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_l3: cpu@3 {
|
||||
@@ -149,6 +152,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_L>;
|
||||
operating-points-v2 = <&cluster0_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_b0: cpu@100 {
|
||||
@@ -159,9 +163,9 @@
|
||||
capacity-dmips-mhz = <1024>;
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_B>;
|
||||
operating-points-v2 = <&cluster1_opp_table>;
|
||||
- #cooling-cells = <2>;
|
||||
dynamic-power-coefficient = <320>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_b1: cpu@101 {
|
||||
@@ -173,6 +177,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_B>;
|
||||
operating-points-v2 = <&cluster1_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_b2: cpu@102 {
|
||||
@@ -184,6 +189,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_B>;
|
||||
operating-points-v2 = <&cluster1_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
cpu_b3: cpu@103 {
|
||||
@@ -195,6 +201,7 @@
|
||||
clocks = <&scmi_clk SCMI_ARMCLK_B>;
|
||||
operating-points-v2 = <&cluster1_opp_table>;
|
||||
cpu-idle-states = <&CPU_SLEEP>;
|
||||
+ #cooling-cells = <2>;
|
||||
};
|
||||
|
||||
idle-states {
|
||||
@@ -520,6 +527,143 @@
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
+ thermal_zones: thermal-zones {
|
||||
+ /* sensor near the center of the SoC */
|
||||
+ package_thermal: package-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 0>;
|
||||
+
|
||||
+ trips {
|
||||
+ package_crit: package-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* sensor for cluster1 (big Cortex-A72 cores) */
|
||||
+ bigcore_thermal: bigcore-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 1>;
|
||||
+
|
||||
+ trips {
|
||||
+ bigcore_alert: bigcore-alert {
|
||||
+ temperature = <85000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "passive";
|
||||
+ };
|
||||
+
|
||||
+ bigcore_crit: bigcore-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ trip = <&bigcore_alert>;
|
||||
+ cooling-device =
|
||||
+ <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_b2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_b3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* sensor for cluster0 (little Cortex-A53 cores) */
|
||||
+ littlecore_thermal: littlecore-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 2>;
|
||||
+
|
||||
+ trips {
|
||||
+ littlecore_alert: littlecore-alert {
|
||||
+ temperature = <85000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "passive";
|
||||
+ };
|
||||
+
|
||||
+ littlecore_crit: littlecore-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ trip = <&littlecore_alert>;
|
||||
+ cooling-device =
|
||||
+ <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
||||
+ <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpu_thermal: gpu-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 3>;
|
||||
+
|
||||
+ trips {
|
||||
+ gpu_alert: gpu-alert {
|
||||
+ temperature = <85000>;
|
||||
+ hysteresis = <2000>;
|
||||
+ type = "passive";
|
||||
+ };
|
||||
+
|
||||
+ gpu_crit: gpu-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ cooling-maps {
|
||||
+ map0 {
|
||||
+ trip = <&gpu_alert>;
|
||||
+ cooling-device =
|
||||
+ <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ npu_thermal: npu-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 4>;
|
||||
+
|
||||
+ trips {
|
||||
+ npu_crit: npu-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ddr_thermal: ddr-thermal {
|
||||
+ polling-delay-passive = <0>;
|
||||
+ polling-delay = <0>;
|
||||
+ thermal-sensors = <&tsadc 5>;
|
||||
+
|
||||
+ trips {
|
||||
+ ddr_crit: ddr-crit {
|
||||
+ temperature = <115000>;
|
||||
+ hysteresis = <0>;
|
||||
+ type = "critical";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
|
||||
@@ -2301,6 +2445,22 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ tsadc: tsadc@2ae70000 {
|
||||
+ compatible = "rockchip,rk3576-tsadc";
|
||||
+ reg = <0x0 0x2ae70000 0x0 0x400>;
|
||||
+ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&cru CLK_TSADC>, <&cru PCLK_TSADC>;
|
||||
+ clock-names = "tsadc", "apb_pclk";
|
||||
+ assigned-clocks = <&cru CLK_TSADC>;
|
||||
+ assigned-clock-rates = <2000000>;
|
||||
+ resets = <&cru SRST_P_TSADC>, <&cru SRST_TSADC>;
|
||||
+ reset-names = "tsadc-apb", "tsadc";
|
||||
+ #thermal-sensor-cells = <1>;
|
||||
+ rockchip,hw-tshut-temp = <120000>;
|
||||
+ rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
|
||||
+ rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
|
||||
+ };
|
||||
+
|
||||
i2c9: i2c@2ae80000 {
|
||||
compatible = "rockchip,rk3576-i2c", "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0x2ae80000 0x0 0x1000>;
|
@@ -68,6 +68,7 @@ ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
|
||||
$(HOST_BUILD_DIR)/arch/mips/include/asm/asm.h \
|
||||
$(HOST_BUILD_DIR)/arch/mips/include/asm/regdef.h \
|
||||
$(HOST_BUILD_DIR)/arch/mips/include/asm/asm-eva.h \
|
||||
$(HOST_BUILD_DIR)/arch/mips/include/asm/isa-rev.h \
|
||||
$(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
|
||||
endef
|
||||
endif
|
||||
|
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.191
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
|
2525
lede/tools/elfutils/patches/010-backport-mips-support-reloc.patch
Normal file
2525
lede/tools/elfutils/patches/010-backport-mips-support-reloc.patch
Normal file
File diff suppressed because it is too large
Load Diff
183
lede/tools/elfutils/patches/101-shared-conditional.patch
Normal file
183
lede/tools/elfutils/patches/101-shared-conditional.patch
Normal file
@@ -0,0 +1,183 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -102,6 +102,8 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
AC_CHECK_TOOL([READELF], [readelf])
|
||||
AC_CHECK_TOOL([NM], [nm])
|
||||
|
||||
+LT_INIT([shared disable-static])
|
||||
+
|
||||
AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))],
|
||||
ac_cv_visibility, [dnl
|
||||
save_CFLAGS="$CFLAGS"
|
||||
@@ -419,7 +421,10 @@ AS_HELP_STRING([--enable-install-elfh],[
|
||||
AM_CONDITIONAL(INSTALL_ELFH, test "$install_elfh" = yes)
|
||||
|
||||
AM_CONDITIONAL(BUILD_STATIC, [dnl
|
||||
-test "$use_gprof" = yes -o "$use_gcov" = yes])
|
||||
+test "$use_gprof" = yes -o "$use_gcov" = yes -o "$enable_static" = yes])
|
||||
+
|
||||
+AM_CONDITIONAL(BUILD_SHARED, [dnl
|
||||
+test "$enable_shared" = yes])
|
||||
|
||||
AC_ARG_ENABLE([tests-rpath],
|
||||
AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
|
||||
--- a/libelf/Makefile.am
|
||||
+++ b/libelf/Makefile.am
|
||||
@@ -35,8 +35,11 @@ endif
|
||||
VERSION = 1
|
||||
|
||||
lib_LIBRARIES = libelf.a
|
||||
+if BUILD_SHARED
|
||||
noinst_LIBRARIES = libelf_pic.a
|
||||
noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
|
||||
+endif
|
||||
+
|
||||
include_HEADERS = libelf.h gelf.h nlist.h
|
||||
|
||||
noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
|
||||
@@ -122,11 +125,15 @@ libelf.so: $(srcdir)/libelf.map $(libelf
|
||||
@$(textrel_check)
|
||||
$(AM_V_at)ln -fs $@ $@.$(VERSION)
|
||||
|
||||
+if BUILD_SHARED
|
||||
install: install-am libelf.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
ln -fs libelf-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libelf.so.$(VERSION)
|
||||
ln -fs libelf.so.$(VERSION) $(DESTDIR)$(libdir)/libelf.so
|
||||
+else
|
||||
+libelf_a_LIBADD = $(foreach dep,$(libelf_so_DEPS:.so=.a) $(LIBS:.so=.a),$(if $(findstring a,$(suffix $(dep))),$(addprefix $(dir $(dep)),$(shell cat $(basename $(dep)).manifest)),$(dep)))
|
||||
+endif
|
||||
|
||||
uninstall: uninstall-am
|
||||
rm -f $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
|
||||
--- a/libdw/Makefile.am
|
||||
+++ b/libdw/Makefile.am
|
||||
@@ -35,8 +35,10 @@ AM_CPPFLAGS += -I$(srcdir)/../libebl -I$
|
||||
VERSION = 1
|
||||
|
||||
lib_LIBRARIES = libdw.a
|
||||
+if BUILD_SHARED
|
||||
noinst_LIBRARIES = libdw_pic.a
|
||||
noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
|
||||
+endif
|
||||
|
||||
include_HEADERS = dwarf.h
|
||||
pkginclude_HEADERS = libdw.h known-dwarf.h
|
||||
@@ -121,11 +123,13 @@ libdw.so: $(srcdir)/libdw.map $(libdw_so
|
||||
@$(textrel_check)
|
||||
$(AM_V_at)ln -fs $@ $@.$(VERSION)
|
||||
|
||||
+if BUILD_SHARED
|
||||
install: install-am libdw.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) libdw.so $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
|
||||
ln -fs libdw-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdw.so.$(VERSION)
|
||||
ln -fs libdw.so.$(VERSION) $(DESTDIR)$(libdir)/libdw.so
|
||||
+endif
|
||||
|
||||
uninstall: uninstall-am
|
||||
rm -f $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so
|
||||
@@ -148,6 +152,10 @@ libdw_a_LIBADD += $(addprefix ../backend
|
||||
libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a)
|
||||
libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects))
|
||||
|
||||
+if !BUILD_SHARED
|
||||
+libdw_a_LIBADD += $(foreach dep,$(libdw_so_DEPS:.so=.a) $(LIBS:.so=.a),$(if $(findstring a,$(suffix $(dep))),$(addprefix $(dir $(dep)),$(shell cat $(basename $(dep)).manifest)),$(dep)))
|
||||
+endif
|
||||
+
|
||||
noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \
|
||||
dwarf_sig8_hash.h cfi.h encoded-value.h
|
||||
|
||||
--- a/libasm/Makefile.am
|
||||
+++ b/libasm/Makefile.am
|
||||
@@ -33,8 +33,11 @@ AM_CPPFLAGS += -I$(top_srcdir)/libelf -I
|
||||
VERSION = 1
|
||||
|
||||
lib_LIBRARIES = libasm.a
|
||||
+if BUILD_SHARED
|
||||
noinst_LIBRARIES = libasm_pic.a
|
||||
noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
|
||||
+endif
|
||||
+
|
||||
pkginclude_HEADERS = libasm.h
|
||||
|
||||
libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
|
||||
@@ -71,11 +74,15 @@ libasm.so: $(srcdir)/libasm.map $(libasm
|
||||
@$(textrel_check)
|
||||
$(AM_V_at)ln -fs $@ $@.$(VERSION)
|
||||
|
||||
+if BUILD_SHARED
|
||||
install: install-am libasm.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) libasm.so $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
|
||||
ln -fs libasm-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
|
||||
ln -fs libasm.so.$(VERSION) $(DESTDIR)$(libdir)/libasm.so
|
||||
+else
|
||||
+libasm_a_LIBADD = $(foreach dep,$(libasm_so_DEPS:.so=.a) $(LIBS:.so=.a),$(if $(findstring a,$(suffix $(dep))),$(addprefix $(dir $(dep)),$(shell cat $(basename $(dep)).manifest)),$(dep)))
|
||||
+endif
|
||||
|
||||
uninstall: uninstall-am
|
||||
rm -f $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
|
||||
--- a/debuginfod/Makefile.am
|
||||
+++ b/debuginfod/Makefile.am
|
||||
@@ -77,8 +77,10 @@ debuginfod_find_LDADD = $(libdw) $(libel
|
||||
|
||||
if LIBDEBUGINFOD
|
||||
noinst_LIBRARIES = libdebuginfod.a
|
||||
+if BUILD_SHARED
|
||||
noinst_LIBRARIES += libdebuginfod_pic.a
|
||||
endif
|
||||
+endif
|
||||
|
||||
libdebuginfod_a_SOURCES = debuginfod-client.c
|
||||
libdebuginfod_pic_a_SOURCES = debuginfod-client.c
|
||||
@@ -111,12 +113,16 @@ $(LIBDEBUGINFOD_SONAME): $(srcdir)/libde
|
||||
libdebuginfod.so: $(LIBDEBUGINFOD_SONAME)
|
||||
ln -fs $< $@
|
||||
|
||||
+if BUILD_SHARED
|
||||
install: install-am libdebuginfod.so
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
$(INSTALL_PROGRAM) $(LIBDEBUGINFOD_SONAME) \
|
||||
$(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
|
||||
ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME)
|
||||
ln -fs libdebuginfod-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libdebuginfod.so
|
||||
+else
|
||||
+libdebuginfod_a_LIBADD = $(foreach dep,$(wildcard $(libdebuginfod_so_LDLIBS:.so=.a)) $(LIBS:.so=.a),$(if $(findstring a,$(suffix $(dep))),$(addprefix $(dir $(dep)),$(shell cat $(basename $(dep)).manifest)),$(dep)))
|
||||
+endif
|
||||
|
||||
uninstall: uninstall-am
|
||||
rm -f $(DESTDIR)$(libdir)/libdebuginfod-$(PACKAGE_VERSION).so
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -50,7 +50,7 @@ check_PROGRAMS = arextract arsymtest new
|
||||
dwfl-report-offline-memory \
|
||||
varlocs backtrace backtrace-child \
|
||||
backtrace-data backtrace-dwarf debuglink debugaltlink \
|
||||
- buildid deleted deleted-lib.so aggregate_size peel_type \
|
||||
+ buildid aggregate_size peel_type \
|
||||
vdsosyms \
|
||||
getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
|
||||
elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
|
||||
@@ -180,7 +180,7 @@ TESTS = run-arextract.sh run-arsymtest.s
|
||||
run-readelf-addr.sh run-readelf-str.sh \
|
||||
run-readelf-multi-noline.sh \
|
||||
run-readelf-types.sh \
|
||||
- run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
|
||||
+ run-readelf-dwz-multi.sh run-allfcts-multi.sh \
|
||||
run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \
|
||||
vdsosyms run-readelf-A.sh \
|
||||
run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \
|
||||
@@ -284,6 +284,11 @@ funcretval_test__11_SOURCES = funcretval
|
||||
TESTS += run-funcretval++11.sh
|
||||
endif
|
||||
|
||||
+if BUILD_SHARED
|
||||
+check_PROGRAMS += deleted deleted-lib.so
|
||||
+TESTS += run-deleted.sh
|
||||
+endif
|
||||
+
|
||||
EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
|
||||
run-ar-N.sh \
|
||||
run-show-die-info.sh run-get-files.sh run-get-lines.sh \
|
161
lede/tools/elfutils/patches/110-objects-manifest.patch
Normal file
161
lede/tools/elfutils/patches/110-objects-manifest.patch
Normal file
@@ -0,0 +1,161 @@
|
||||
--- a/libdw/Makefile.am
|
||||
+++ b/libdw/Makefile.am
|
||||
@@ -137,19 +137,19 @@ uninstall: uninstall-am
|
||||
rm -f $(DESTDIR)$(libdir)/libdw.so
|
||||
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
|
||||
|
||||
-libdwfl_objects = $(shell $(AR) t ../libdwfl/libdwfl.a)
|
||||
+libdwfl_objects = $(shell cat ../libdwfl/libdwfl.manifest)
|
||||
libdw_a_LIBADD = $(addprefix ../libdwfl/,$(libdwfl_objects))
|
||||
|
||||
-libdwelf_objects = $(shell $(AR) t ../libdwelf/libdwelf.a)
|
||||
+libdwelf_objects = $(shell cat ../libdwelf/libdwelf.manifest)
|
||||
libdw_a_LIBADD += $(addprefix ../libdwelf/,$(libdwelf_objects))
|
||||
|
||||
-libebl_objects = $(shell $(AR) t ../libebl/libebl.a)
|
||||
+libebl_objects = $(shell cat ../libebl/libebl.manifest)
|
||||
libdw_a_LIBADD += $(addprefix ../libebl/,$(libebl_objects))
|
||||
|
||||
-backends_objects = $(shell $(AR) t ../backends/libebl_backends.a)
|
||||
+backends_objects = $(shell cat ../backends/libebl_backends.manifest)
|
||||
libdw_a_LIBADD += $(addprefix ../backends/,$(backends_objects))
|
||||
|
||||
-libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a)
|
||||
+libcpu_objects = $(shell cat ../libcpu/libcpu.manifest)
|
||||
libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects))
|
||||
|
||||
if !BUILD_SHARED
|
||||
@@ -161,4 +161,9 @@ noinst_HEADERS = libdwP.h memory-access.
|
||||
|
||||
EXTRA_DIST = libdw.map
|
||||
|
||||
-MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so libdw.so.$(VERSION)
|
||||
+EXTRA_libdw_a_DEPENDENCIES = libdw.manifest
|
||||
+
|
||||
+libdw.manifest: $(libdw_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) $(EXTRA_libdw_a_DEPENDENCIES) libdw.so libdw.so.$(VERSION)
|
||||
--- a/libdwfl/Makefile.am
|
||||
+++ b/libdwfl/Makefile.am
|
||||
@@ -93,4 +93,10 @@ am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_S
|
||||
|
||||
noinst_HEADERS = libdwflP.h
|
||||
|
||||
+EXTRA_libdwfl_a_DEPENDENCIES = libdwfl.manifest
|
||||
+
|
||||
+libdwfl.manifest: $(libdwfl_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(EXTRA_libdwfl_a_DEPENDENCIES)
|
||||
CLEANFILES += $(am_libdwfl_pic_a_OBJECTS)
|
||||
--- a/libdwelf/Makefile.am
|
||||
+++ b/libdwelf/Makefile.am
|
||||
@@ -54,4 +54,10 @@ libeu = ../lib/libeu.a
|
||||
libdwelf_pic_a_SOURCES =
|
||||
am_libdwelf_pic_a_OBJECTS = $(libdwelf_a_SOURCES:.c=.os)
|
||||
|
||||
+EXTRA_libdwelf_a_DEPENDENCIES = libdwelf.manifest
|
||||
+
|
||||
+libdwelf.manifest: $(libdwelf_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(EXTRA_libdwelf_a_DEPENDENCIES)
|
||||
CLEANFILES += $(am_libdwelf_pic_a_OBJECTS)
|
||||
--- a/libebl/Makefile.am
|
||||
+++ b/libebl/Makefile.am
|
||||
@@ -61,4 +61,9 @@ am_libebl_pic_a_OBJECTS = $(libebl_a_SOU
|
||||
|
||||
noinst_HEADERS = libebl.h libeblP.h ebl-hooks.h
|
||||
|
||||
-MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS)
|
||||
+EXTRA_libebl_a_DEPENDENCIES = libebl.manifest
|
||||
+
|
||||
+libebl.manifest: $(libebl_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS) $(EXTRA_libebl_a_DEPENDENCIES)
|
||||
--- a/backends/Makefile.am
|
||||
+++ b/backends/Makefile.am
|
||||
@@ -119,4 +119,9 @@ am_libebl_backends_pic_a_OBJECTS = $(lib
|
||||
noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c
|
||||
EXTRA_DIST = $(modules:=_reloc.def)
|
||||
|
||||
-MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS)
|
||||
+EXTRA_libebl_backends_a_DEPENDENCIES = libebl_backends.manifest
|
||||
+
|
||||
+libebl_backends.manifest: $(libebl_backends_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS) $(EXTRA_libebl_backends_a_DEPENDENCIES)
|
||||
--- a/libcpu/Makefile.am
|
||||
+++ b/libcpu/Makefile.am
|
||||
@@ -101,6 +101,11 @@ bpf_disasm_CFLAGS = -Wno-format-nonliter
|
||||
|
||||
EXTRA_DIST = defs/i386
|
||||
|
||||
-MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS)
|
||||
+EXTRA_libcpu_a_DEPENDENCIES = libcpu.manifest
|
||||
+
|
||||
+libcpu.manifest: $(libcpu_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS) $(EXTRA_libcpu_a_DEPENDENCIES)
|
||||
CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics)
|
||||
MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h)
|
||||
--- a/libelf/Makefile.am
|
||||
+++ b/libelf/Makefile.am
|
||||
@@ -142,4 +142,10 @@ uninstall: uninstall-am
|
||||
|
||||
EXTRA_DIST = libelf.map
|
||||
|
||||
+EXTRA_libelf_a_DEPENDENCIES = libelf.manifest
|
||||
+
|
||||
+libelf.manifest: $(libelf_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(EXTRA_libelf_a_DEPENDENCIES)
|
||||
CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION)
|
||||
--- a/lib/Makefile.am
|
||||
+++ b/lib/Makefile.am
|
||||
@@ -41,3 +41,10 @@ noinst_HEADERS = fixedsizehash.h libeu.h
|
||||
eu-config.h color.h printversion.h bpf.h \
|
||||
atomics.h stdatomic-fbsd.h dynamicsizehash_concurrent.h
|
||||
EXTRA_DIST = dynamicsizehash.c dynamicsizehash_concurrent.c
|
||||
+
|
||||
+EXTRA_libeu_a_DEPENDENCIES = libeu.manifest
|
||||
+
|
||||
+libeu.manifest: $(libeu_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(EXTRA_libeu_a_DEPENDENCIES)
|
||||
--- a/libasm/Makefile.am
|
||||
+++ b/libasm/Makefile.am
|
||||
@@ -93,4 +93,10 @@ uninstall: uninstall-am
|
||||
noinst_HEADERS = libasmP.h symbolhash.h
|
||||
EXTRA_DIST = libasm.map
|
||||
|
||||
+EXTRA_libasm_a_DEPENDENCIES = libasm.manifest
|
||||
+
|
||||
+libasm.manifest: $(libasm_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(EXTRA_libasm_a_DEPENDENCIES)
|
||||
CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION)
|
||||
--- a/debuginfod/Makefile.am
|
||||
+++ b/debuginfod/Makefile.am
|
||||
@@ -132,7 +132,13 @@ uninstall: uninstall-am
|
||||
endif
|
||||
|
||||
EXTRA_DIST = libdebuginfod.map
|
||||
-MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME)
|
||||
+
|
||||
+EXTRA_libdebuginfod_a_DEPENDENCIES = libdebuginfod.manifest
|
||||
+
|
||||
+libdebuginfod.manifest: $(libdebuginfod_a_OBJECTS)
|
||||
+ echo $^ > $@
|
||||
+
|
||||
+MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME) $(EXTRA_libdebuginfod_a_DEPENDENCIES)
|
||||
CLEANFILES += $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so
|
||||
|
||||
# automake std-options override: arrange to pass LD_LIBRARY_PATH
|
@@ -73,7 +73,7 @@ func (u *CoreUpdater) Update(currentExePath string) (err error) {
|
||||
u.mu.Lock()
|
||||
defer u.mu.Unlock()
|
||||
|
||||
info, err := os.Stat(currentExePath)
|
||||
_, err = os.Stat(currentExePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("check currentExePath %q: %w", currentExePath, err)
|
||||
}
|
||||
@@ -146,8 +146,6 @@ func (u *CoreUpdater) Update(currentExePath string) (err error) {
|
||||
return fmt.Errorf("backuping: %w", err)
|
||||
}
|
||||
|
||||
_ = os.Chmod(updateExePath, info.Mode())
|
||||
|
||||
err = u.replace(updateExePath, currentExePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("replacing: %w", err)
|
||||
@@ -194,13 +192,6 @@ func (u *CoreUpdater) download(updateDir, packagePath, packageURL string) (err e
|
||||
}
|
||||
}()
|
||||
|
||||
log.Debugln("updater: reading http body")
|
||||
// This use of ReadAll is now safe, because we limited body's Reader.
|
||||
body, err := io.ReadAll(io.LimitReader(resp.Body, MaxPackageFileSize))
|
||||
if err != nil {
|
||||
return fmt.Errorf("io.ReadAll() failed: %w", err)
|
||||
}
|
||||
|
||||
log.Debugln("updateDir %s", updateDir)
|
||||
err = os.Mkdir(updateDir, 0o755)
|
||||
if err != nil {
|
||||
@@ -208,10 +199,33 @@ func (u *CoreUpdater) download(updateDir, packagePath, packageURL string) (err e
|
||||
}
|
||||
|
||||
log.Debugln("updater: saving package to file %s", packagePath)
|
||||
err = os.WriteFile(packagePath, body, 0o644)
|
||||
// Create the output file
|
||||
wc, err := os.OpenFile(packagePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755)
|
||||
if err != nil {
|
||||
return fmt.Errorf("os.WriteFile() failed: %w", err)
|
||||
return fmt.Errorf("os.OpenFile(%s): %w", packagePath, err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
closeErr := wc.Close()
|
||||
if closeErr != nil && err == nil {
|
||||
err = closeErr
|
||||
}
|
||||
}()
|
||||
|
||||
log.Debugln("updater: reading http body")
|
||||
// This use of io.Copy is now safe, because we limited body's Reader.
|
||||
n, err := io.Copy(wc, io.LimitReader(resp.Body, MaxPackageFileSize))
|
||||
if err != nil {
|
||||
return fmt.Errorf("io.Copy(): %w", err)
|
||||
}
|
||||
if n == MaxPackageFileSize {
|
||||
// Use whether n is equal to MaxPackageFileSize to determine whether the limit has been reached.
|
||||
// It is also possible that the size of the downloaded file is exactly the same as the maximum limit,
|
||||
// but we should not consider this too rare situation.
|
||||
return fmt.Errorf("attempted to read more than %d bytes", MaxPackageFileSize)
|
||||
}
|
||||
log.Debugln("updater: downloaded package to file %s", packagePath)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -237,12 +251,19 @@ func (u *CoreUpdater) unpack(updateDir, packagePath string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// backup makes a backup of the current executable file
|
||||
// backup creates a backup of the current executable file.
|
||||
func (u *CoreUpdater) backup(currentExePath, backupExePath, backupDir string) (err error) {
|
||||
log.Infoln("updater: backing up current ExecFile:%s to %s", currentExePath, backupExePath)
|
||||
_ = os.Mkdir(backupDir, 0o755)
|
||||
|
||||
// On Windows, since the running executable cannot be overwritten or deleted, it uses os.Rename to move the file to the backup path.
|
||||
// On other platforms, it copies the file to the backup path, preserving the original file and its permissions.
|
||||
// The backup directory is created if it does not exist.
|
||||
if runtime.GOOS == "windows" {
|
||||
err = os.Rename(currentExePath, backupExePath)
|
||||
} else {
|
||||
err = u.copyFile(currentExePath, backupExePath)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -252,20 +273,15 @@ func (u *CoreUpdater) backup(currentExePath, backupExePath, backupDir string) (e
|
||||
|
||||
// replace moves the current executable with the updated one
|
||||
func (u *CoreUpdater) replace(updateExePath, currentExePath string) error {
|
||||
var err error
|
||||
|
||||
log.Infoln("replacing: %s to %s", updateExePath, currentExePath)
|
||||
if runtime.GOOS == "windows" {
|
||||
// rename fails with "File in use" error
|
||||
err = u.copyFile(updateExePath, currentExePath)
|
||||
} else {
|
||||
err = os.Rename(updateExePath, currentExePath)
|
||||
}
|
||||
|
||||
// Use copyFile to retain the original file attributes
|
||||
err := u.copyFile(updateExePath, currentExePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Infoln("updater: renamed: %s to %s", updateExePath, currentExePath)
|
||||
log.Infoln("updater: copy: %s to %s", updateExePath, currentExePath)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -411,10 +427,15 @@ func (u *CoreUpdater) copyFile(src, dst string) (err error) {
|
||||
}
|
||||
}()
|
||||
|
||||
info, err := rc.Stat()
|
||||
if err != nil {
|
||||
return fmt.Errorf("rc.Stat(): %w", err)
|
||||
}
|
||||
|
||||
// Create the output file
|
||||
// If the file does not exist, creates it with permissions perm (before umask);
|
||||
// otherwise truncates it before writing, without changing permissions.
|
||||
wc, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
|
||||
wc, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, info.Mode())
|
||||
if err != nil {
|
||||
return fmt.Errorf("os.OpenFile(%s): %w", dst, err)
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-amlogic
|
||||
PKG_VERSION:=3.1.259
|
||||
PKG_VERSION:=3.1.260
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 License
|
||||
|
@@ -173,7 +173,7 @@ check_kernel() {
|
||||
latest_version="$(
|
||||
curl -fsSL -m 10 \
|
||||
${kernel_api}/releases/expanded_assets/kernel_${kernel_tag} |
|
||||
grep -oE "${main_line_version}.[0-9]+.*.tar.gz" | sed 's/.tar.gz//' |
|
||||
grep -oE "${main_line_version}\.[0-9]+.*\.tar\.gz" | sed 's/.tar.gz//' |
|
||||
sort -urV | head -n 1
|
||||
)"
|
||||
[[ -n "${latest_version}" ]] || tolog "02.03 No kernel available, please use another kernel branch." "1"
|
||||
|
File diff suppressed because one or more lines are too long
@@ -81,6 +81,7 @@
|
||||
--font-family-sans-serif: "Google Sans", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
|
||||
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
||||
--font-family-normal: Open Sans, PingFangSC-Regular, Microsoft Yahei, WenQuanYi Micro Hei, "Helvetica Neue", Helvetica, Hiragino Sans GB, sans-serif;
|
||||
--dropdown-arrow-icon: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik01LjI5MyA5LjI5M2ExIDEgMCAwIDEgMS40MTQgMEwxMiAxNC41ODZsNS4yOTMtNS4yOTNhMSAxIDAgMSAxIDEuNDE0IDEuNDE0bC02IDZhMSAxIDAgMCAxLTEuNDE0IDBsLTYtNmExIDEgMCAwIDEgMC0xLjQxNCIvPjwvc3ZnPg==");
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -94,8 +95,6 @@ body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
font-family: "Google Sans", "Microsoft Yahei", "WenQuanYi Micro Hei", "sans-serif", "Helvetica Neue", "Helvetica", "Hiragino Sans GB";
|
||||
font-family: var(--font-family-sans-serif);
|
||||
}
|
||||
|
||||
@@ -105,12 +104,10 @@ html {
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 0.875rem;
|
||||
background-color: #f4f5f7;
|
||||
background-color: var(--background-color);
|
||||
color: #32325d;
|
||||
color: var(--gray-dark);
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,14 +279,6 @@ h6 {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
select {
|
||||
padding: .36rem .8rem;
|
||||
color: #555;
|
||||
border: thin solid #ccc;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn,
|
||||
button,
|
||||
select,
|
||||
@@ -297,7 +286,6 @@ input,
|
||||
.cbi-dropdown {
|
||||
line-height: 1.5em;
|
||||
padding: .5rem .75rem;
|
||||
|
||||
color: #8898aa;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: .25rem;
|
||||
@@ -307,19 +295,21 @@ input,
|
||||
transition: box-shadow .15s ease;
|
||||
}
|
||||
|
||||
select,
|
||||
.cbi-dropdown {
|
||||
width: inherit;
|
||||
cursor: default;
|
||||
padding-right: 1rem;
|
||||
|
||||
|
||||
select{
|
||||
padding-right: 1.5rem;
|
||||
background-image: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSIjODg5OGFhIiBkPSJNNS4yOTMgOS4yOTNhMSAxIDAgMCAxIDEuNDE0IDBMMTIgMTQuNTg2bDUuMjkzLTUuMjkzYTEgMSAwIDEgMSAxLjQxNCAxLjQxNGwtNiA2YTEgMSAwIDAgMS0xLjQxNCAwbC02LTZhMSAxIDAgMCAxIDAtMS40MTQiLz48L3N2Zz4="); background-size: 1rem;
|
||||
background-position: right 0.5rem center;
|
||||
background-repeat: no-repeat;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
select:not([multiple="multiple"]):focus,
|
||||
input:not(.cbi-button):focus,
|
||||
.cbi-dropdown:focus {
|
||||
border-color: #5e72e4;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 3px 9px rgba(50, 50, 9, 0), 3px 4px 8px rgba(94, 114, 228, .1);
|
||||
box-shadow: 0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);;
|
||||
}
|
||||
|
||||
.cbi-dropdown,
|
||||
@@ -369,7 +359,6 @@ h1 {
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0 0 1rem 0;
|
||||
font-size: 1.25rem;
|
||||
letter-spacing: 0.1rem;
|
||||
padding: 1rem 1.25rem;
|
||||
@@ -379,6 +368,7 @@ h2 {
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, .03);
|
||||
font-weight: bold;
|
||||
|
||||
|
||||
}
|
||||
|
||||
h3 {
|
||||
@@ -989,7 +979,6 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
|
||||
.alert,
|
||||
.alert-message {
|
||||
font-weight: bold;
|
||||
margin-bottom: 1.25rem;
|
||||
margin-left: 1.25rem;
|
||||
margin-right: 1.25rem;
|
||||
padding: 1rem 1.25rem;
|
||||
@@ -999,6 +988,7 @@ div[style="width:100%;height:300px;border:1px solid #000;background:#fff"] {
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
|
||||
text-shadow: none;
|
||||
|
||||
|
||||
&.error {
|
||||
background-color: #ffd600;
|
||||
}
|
||||
@@ -1423,7 +1413,6 @@ body[class*="node-"] > .main > .main-left > .nav > .slide > .menu.active::before
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
min-width: inherit;
|
||||
margin: 1.25rem 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
|
||||
@@ -1448,14 +1437,19 @@ body[class*="node-"] > .main > .main-left > .nav > .slide > .menu.active::before
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.cbi-map:not(:first-child) {
|
||||
margin-top: 1rem;
|
||||
.cbi-map{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
.cbi-map > .cbi-tabmenu + div{
|
||||
margin-top: -0.5rem;
|
||||
}
|
||||
|
||||
.cbi-map-descr {
|
||||
font-size: small;
|
||||
line-height: 1.5;
|
||||
padding: 0 1.25rem 1rem 1.25rem;
|
||||
padding: 0 1.25rem;
|
||||
}
|
||||
|
||||
.cbi-section {
|
||||
@@ -1679,7 +1673,7 @@ tr > th,
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
gap: 0px;
|
||||
gap: 1rem;
|
||||
|
||||
input {
|
||||
border-right-width: 0;
|
||||
@@ -1694,6 +1688,18 @@ tr > th,
|
||||
}
|
||||
}
|
||||
|
||||
.control-group:has(> input:first-child + .cbi-button){
|
||||
gap: 0 !important;
|
||||
input{
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
width: 15.5rem;
|
||||
min-width: 15.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.control-group > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -1723,8 +1729,6 @@ td > table > tbody > tr > td,
|
||||
display: inline-block;
|
||||
width: auto !important;
|
||||
padding: 0.5rem .75rem;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
@@ -1806,22 +1810,22 @@ td > table > tbody > tr > td,
|
||||
.cbi-button:focus,
|
||||
.item:hover::after,
|
||||
.item:focus::after {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
box-shadow: 0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.cbi-button:active,
|
||||
.item:active::after {
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23);
|
||||
box-shadow:0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);
|
||||
}
|
||||
|
||||
.cbi-button-up:hover,
|
||||
.cbi-button-up:focus {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 -2px 2px rgba(0, 0, 0, .2);
|
||||
box-shadow: 0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);
|
||||
}
|
||||
|
||||
.cbi-button-up:active {
|
||||
box-shadow: 0 -10px 20px rgba(0, 0, 0, .19), 0 -6px 6px rgba(0, 0, 0, .23);
|
||||
box-shadow: 0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);
|
||||
}
|
||||
|
||||
.btn:disabled,
|
||||
@@ -1915,7 +1919,7 @@ td > table > tbody > tr > td,
|
||||
.cbi-button[onclick="handleReset(event)"],
|
||||
.cbi-button-neutral[value="Disable"] {
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
color: var(--white);
|
||||
border: thin solid #eea236;
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
@@ -1924,15 +1928,30 @@ td > table > tbody > tr > td,
|
||||
.cbi-button-success,
|
||||
.cbi-button-download {
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
color: var(--white);
|
||||
border: thin solid #4cae4c;
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.cbi-page-actions .cbi-button-link:first-child {
|
||||
.cbi-page-actions{
|
||||
.cbi-button-link:first-child {
|
||||
float: left;
|
||||
}
|
||||
.cbi-dropdown {
|
||||
.open{
|
||||
color: var(--white);
|
||||
}
|
||||
.more{
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
text-indent: 5000px;
|
||||
background-color: var(--white)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.a-to-btn {
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -2172,6 +2191,12 @@ td > table > tbody > tr > td,
|
||||
}
|
||||
}
|
||||
|
||||
.cbi-value-field.cbi-dropdown-open{
|
||||
.cbi-dropdown{
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 3px 9px rgba(50, 50, 9, 0), 3px 4px 8px rgba(94, 114, 228, .1);
|
||||
}
|
||||
}
|
||||
|
||||
.cbi-value-field .cbi-dropdown,
|
||||
.cbi-value-field .cbi-input-select,
|
||||
@@ -2181,6 +2206,7 @@ td > table > tbody > tr > td,
|
||||
min-width: 18rem;
|
||||
}
|
||||
|
||||
|
||||
.cbi-value input[type="password"] {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
@@ -2293,11 +2319,11 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
|
||||
.td.cbi-section-actions > * {
|
||||
display: inline-flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.td.cbi-section-actions > * > *,
|
||||
.td.cbi-section-actions > * > form > * {
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -2384,7 +2410,6 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
width: 100%;
|
||||
min-width: 16rem;
|
||||
margin: 0.25rem 0;
|
||||
gap: 0;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
input {
|
||||
@@ -2475,12 +2500,15 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
.cbi-dropdown {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
|
||||
padding-right: 0.25rem;
|
||||
min-height: 2.1875rem;
|
||||
}
|
||||
.cbi-dropdown{
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cbi-dropdown.btn > ul:not(.dropdown), .cbi-dropdown.cbi-button > ul:not(.dropdown) {
|
||||
margin: 0 0 0 0.75rem !important;
|
||||
margin: 0 0.75rem;
|
||||
}
|
||||
|
||||
.cbi-dropdown[placeholder*="select"] {
|
||||
@@ -2494,7 +2522,6 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
margin: 0 !important;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
outline: 0;
|
||||
@@ -2528,33 +2555,26 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
}
|
||||
|
||||
.cbi-dropdown > .open {
|
||||
flex-basis: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
padding: 0 0.75rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
font-size: 0;
|
||||
color: #8898aa;
|
||||
background-color: currentColor;
|
||||
mask-image: var(--dropdown-arrow-icon);
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 100% 100%;
|
||||
mask-mode: match-source;
|
||||
}
|
||||
|
||||
.cbi-dropdown > .open,
|
||||
.cbi-dropdown > .more {
|
||||
font-size: 1rem;
|
||||
font-weight: 900;
|
||||
line-height: 1em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
padding: 0 .375rem;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
outline: 0;
|
||||
border-left: thin solid #ccc;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.cbi-dropdown > .more,
|
||||
.cbi-dropdown > ul > li[placeholder] {
|
||||
font-weight: bold;
|
||||
display: none;
|
||||
color: #777;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.cbi-dropdown > ul > li {
|
||||
@@ -2605,7 +2625,9 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
}
|
||||
|
||||
.cbi-dropdown > ul > li input[type="text"] {
|
||||
height: 20px;
|
||||
height: 2rem;
|
||||
min-width: 16rem;
|
||||
padding: 0 .5rem;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open] > ul.dropdown {
|
||||
@@ -2619,10 +2641,10 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
border: 0 solid #918e8c;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 0 4px #918e8c;
|
||||
border-bottom-left-radius: 0.25rem;
|
||||
border-bottom-right-radius: 0.25rem;
|
||||
border-radius: 0.25rem;
|
||||
color: var(--main-menu-color);
|
||||
margin-left: -0 !important;
|
||||
margin-top: 0.25rem;
|
||||
left: 0;
|
||||
|
||||
li {
|
||||
@@ -2660,7 +2682,8 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child {
|
||||
|
||||
.cbi-dropdown[open] > ul.dropdown > li {
|
||||
border-bottom: thin solid #ccc;
|
||||
padding: 0.5rem 0.8rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cbi-dropdown[open] > ul.dropdown > li label {
|
||||
@@ -2878,6 +2901,9 @@ body.modal-overlay-active #modal_overlay {
|
||||
|
||||
#view {
|
||||
border-radius: 0.25rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
& > .spinning {
|
||||
position: fixed;
|
||||
@@ -2930,6 +2956,8 @@ body.modal-overlay-active #modal_overlay {
|
||||
padding: 1rem;
|
||||
text-align: right;
|
||||
justify-content: flex-end;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.cbi-page-actions > form[method="post"] {
|
||||
@@ -3327,11 +3355,11 @@ span[data-tooltip] .label {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
left: -10000px;
|
||||
box-shadow: 0 0 2px #8b8b8b;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 3px 9px rgba(50,50,9,0),3px 4px 8px rgba(94,114,228,0.1);
|
||||
border-radius: 0.25rem;
|
||||
background: #fff;
|
||||
white-space: pre;
|
||||
padding: 2px 5px;
|
||||
padding: 0.5rem;
|
||||
opacity: 0;
|
||||
transition: opacity .25s ease-in;
|
||||
transform: translate(-50%, 10%);
|
||||
@@ -3462,6 +3490,12 @@ label[data-index][data-depends] {
|
||||
background-color: #fff !important;
|
||||
border-bottom: 1px solid #dee2e6 !important;
|
||||
}
|
||||
|
||||
.cbi-dropdown{
|
||||
.open{
|
||||
color: var(--white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[name="ping"],
|
||||
@@ -3534,9 +3568,6 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
#view > h2:first-child + p {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
[data-page="admin-system-poweroff"] {
|
||||
@@ -3599,7 +3630,6 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
[data-page="admin-system-admin"] .cbi-map .cbi-map-descr,
|
||||
[data-page="admin-system-admin-password"] .cbi-map .cbi-map-descr {
|
||||
margin-left: 0;
|
||||
color: #32325d;
|
||||
color: var(--gray-dark);
|
||||
}
|
||||
|
||||
@@ -3613,7 +3643,6 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
/* software */
|
||||
[data-page="admin-system-opkg"] h2 {
|
||||
margin-left: 0;
|
||||
color: #32325d;
|
||||
color: var(--gray-dark);
|
||||
}
|
||||
|
||||
@@ -3623,7 +3652,11 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin: .5em 1rem 1em 1rem !important;
|
||||
gap: 0.5rem;
|
||||
margin: 0 1.25rem !important;
|
||||
}
|
||||
.controls > div{
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.controls > * > .btn:not([aria-label$="page"]) {
|
||||
@@ -3646,10 +3679,12 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
padding: .3rem .6rem;
|
||||
}
|
||||
|
||||
[data-page^="admin-system-admin"]:not(.node-main-login) .cbi-map:not(#cbi-dropbear),
|
||||
[data-page="admin-system-opkg"] #maincontent > .container {
|
||||
margin-top: 1rem;
|
||||
padding-top: .01rem;
|
||||
[data-page="admin-status-overview"]{
|
||||
.container{
|
||||
h2[name="content"]{
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[data-page="admin-system-opkg"] #maincontent > .container {
|
||||
@@ -3671,6 +3706,7 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
[data-page="admin-system-system"] {
|
||||
.control-group {
|
||||
margin-top: 0.5rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.cbi-dynlist {
|
||||
@@ -3708,11 +3744,6 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
/* admin-system-crontab*/
|
||||
[data-page="admin-system-crontab"] {
|
||||
#view p {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
line-height: 1.25;
|
||||
@@ -3731,6 +3762,23 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
}
|
||||
}
|
||||
|
||||
[data-page="admin-system-crontabhelper"]{
|
||||
.crontab-row{
|
||||
.dropdown-container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*admin-system-attendedsysupgrade-configuration*/
|
||||
[data-page="admin-system-attendedsysupgrade-configuration"] {
|
||||
.cbi-map {
|
||||
@@ -3888,8 +3936,7 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
[data-page="admin-status-routes"] {
|
||||
#view {
|
||||
p {
|
||||
padding: 0 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0 1.25rem;
|
||||
|
||||
textarea {
|
||||
padding: 1rem;
|
||||
@@ -3900,9 +3947,19 @@ div[style*="display:grid;grid-template-columns:repeat"] {
|
||||
& > h3 {
|
||||
border-radius: 0.25rem 0.25rem 0 0;
|
||||
}
|
||||
|
||||
.cbi-tabmenu + div{
|
||||
margin-top: -0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
[data-page="admin-status-nftables"]{
|
||||
.nft-chain-hook{
|
||||
padding:0.5rem 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* applyreboot fix */
|
||||
#applyreboot-container {
|
||||
@@ -4390,6 +4447,7 @@ pre.command-output {
|
||||
min-width: 18rem;
|
||||
}
|
||||
|
||||
|
||||
#cbi-firewall-zone .cbi-input-select {
|
||||
min-width: 9rem;
|
||||
}
|
||||
@@ -4881,27 +4939,21 @@ pre.command-output {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.cbi-tab-disabled[data-errors]::after {
|
||||
position: absolute;
|
||||
top: -0.25rem;
|
||||
right: -0.25rem;
|
||||
content: attr(data-errors);
|
||||
background-color: #f5365c;
|
||||
background-color: var(--red);
|
||||
color: #fff;
|
||||
height: 1em;
|
||||
min-width: 1em;
|
||||
border-radius: 1em;
|
||||
width: 0.875rem;
|
||||
height: 0.875rem;
|
||||
border-radius: 0.875rem;
|
||||
text-align: center;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
font-size: .8em;
|
||||
padding: 2px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
font-size: .75em;
|
||||
}
|
||||
|
@@ -187,18 +187,8 @@ template {
|
||||
display: none
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif
|
||||
}
|
||||
|
||||
.hidden,
|
||||
[hidden] {
|
||||
display: none !important
|
||||
}
|
||||
|
||||
.pure-g {
|
||||
display: flex;
|
||||
|
@@ -132,7 +132,7 @@ if api.compare_versions(xray_version, ">=", "1.8.10") then
|
||||
end
|
||||
|
||||
-- 探测地址
|
||||
local ucpu = s:option(Flag, _n("useCustomProbeUrl"), translate("Use Custome Probe URL"), translate("By default the built-in probe URL will be used, enable this option to use a custom probe URL."))
|
||||
local ucpu = s:option(Flag, _n("useCustomProbeUrl"), translate("Use Custom Probe URL"), translate("By default the built-in probe URL will be used, enable this option to use a custom probe URL."))
|
||||
ucpu:depends({ [_n("balancingStrategy")] = "leastPing" })
|
||||
ucpu:depends({ [_n("balancingStrategy")] = "leastLoad" })
|
||||
|
||||
@@ -403,6 +403,9 @@ o.default = "chrome"
|
||||
o:depends({ [_n("tls")] = true, [_n("utls")] = true })
|
||||
o:depends({ [_n("tls")] = true, [_n("reality")] = true })
|
||||
|
||||
o = s:option(Value, _n("reality_mldsa65Verify"), "ML-DSA-65 " .. translate("Public key"))
|
||||
o:depends({ [_n("tls")] = true, [_n("reality")] = true })
|
||||
|
||||
o = s:option(ListValue, _n("transport"), translate("Transport"))
|
||||
o:value("raw", "RAW (TCP)")
|
||||
o:value("mkcp", "mKCP")
|
||||
|
@@ -186,6 +186,9 @@ o:value("h2,http/1.1")
|
||||
o:value("h3,h2,http/1.1")
|
||||
o:depends({ [_n("tls")] = true })
|
||||
|
||||
o = s:option(Value, _n("reality_mldsa65Seed"), "ML-DSA-65 " .. translate("Private Key"))
|
||||
o:depends({ [_n("reality")] = true })
|
||||
|
||||
-- o = s:option(Value, _n("minversion"), translate("minversion"))
|
||||
-- o.default = "1.3"
|
||||
-- o:value("1.3")
|
||||
|
@@ -1,11 +1,13 @@
|
||||
local _M = {}
|
||||
|
||||
local function gh_release_url(self)
|
||||
return "https://api.github.com/repos/" .. self.repo .. "/releases/latest"
|
||||
--return "https://api.github.com/repos/" .. self.repo .. "/releases/latest"
|
||||
return "https://github.com/xiaorouji/openwrt-passwall-packages/releases/download/api-cache/" .. string.lower(self.name) .. "-release-api.json"
|
||||
end
|
||||
|
||||
local function gh_pre_release_url(self)
|
||||
return "https://api.github.com/repos/" .. self.repo .. "/releases?per_page=1"
|
||||
--return "https://api.github.com/repos/" .. self.repo .. "/releases?per_page=1"
|
||||
return "https://github.com/xiaorouji/openwrt-passwall-packages/releases/download/api-cache/" .. string.lower(self.name) .. "-pre-release-api.json"
|
||||
end
|
||||
|
||||
-- 排序顺序定义
|
||||
|
@@ -164,7 +164,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
publicKey = node.reality_publicKey,
|
||||
shortId = node.reality_shortId or "",
|
||||
spiderX = node.reality_spiderX or "/",
|
||||
fingerprint = (node.type == "Xray" and node.fingerprint and node.fingerprint ~= "") and node.fingerprint or "chrome"
|
||||
fingerprint = (node.type == "Xray" and node.fingerprint and node.fingerprint ~= "") and node.fingerprint or "chrome",
|
||||
mldsa65Verify = (node.reality_mldsa65Verify and node.reality_mldsa65Verify ~= "") and node.reality_mldsa65Verify or nil
|
||||
} or nil,
|
||||
rawSettings = ((node.transport == "raw" or node.transport == "tcp") and node.protocol ~= "socks" and (node.tcp_guise and node.tcp_guise ~= "none")) and {
|
||||
header = {
|
||||
@@ -548,7 +549,8 @@ function gen_config_server(node)
|
||||
dest = node.reality_dest,
|
||||
serverNames = node.reality_serverNames or {},
|
||||
privateKey = node.reality_private_key,
|
||||
shortIds = node.reality_shortId or ""
|
||||
shortIds = node.reality_shortId or "",
|
||||
mldsa65Seed = (node.reality_mldsa65Seed and node.reality_mldsa65Seed ~= "") and node.reality_mldsa65Seed or nil
|
||||
} or nil
|
||||
end
|
||||
end
|
||||
|
@@ -286,6 +286,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
params += opt.query("pbk", dom_prefix + "reality_publicKey");
|
||||
params += opt.query("sid", dom_prefix + "reality_shortId");
|
||||
params += opt.query("spx", dom_prefix + "reality_spiderX");
|
||||
params += opt.query("pqv", dom_prefix + "reality_mldsa65Verify");
|
||||
}
|
||||
if (opt.get(dom_prefix + "flow") && opt.get(dom_prefix + "flow").value) {
|
||||
let v_flow = opt.get(dom_prefix + "flow").value;
|
||||
@@ -461,6 +462,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
params += opt.query("pbk", dom_prefix + "reality_publicKey");
|
||||
params += opt.query("sid", dom_prefix + "reality_shortId");
|
||||
params += opt.query("spx", dom_prefix + "reality_spiderX");
|
||||
params += opt.query("pqv", dom_prefix + "reality_mldsa65Verify");
|
||||
}
|
||||
if (opt.get(dom_prefix + "flow") && opt.get(dom_prefix + "flow").value) {
|
||||
let v_flow = opt.get(dom_prefix + "flow").value;
|
||||
@@ -529,6 +531,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
params += opt.query("pbk", dom_prefix + "reality_publicKey");
|
||||
params += opt.query("sid", dom_prefix + "reality_shortId");
|
||||
params += opt.query("spx", dom_prefix + "reality_spiderX");
|
||||
params += opt.query("pqv", dom_prefix + "reality_mldsa65Verify");
|
||||
}
|
||||
if (opt.get(dom_prefix + "flow") && opt.get(dom_prefix + "flow").value) {
|
||||
let v_flow = opt.get(dom_prefix + "flow").value;
|
||||
@@ -983,6 +986,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'reality_publicKey', queryParam.pbk || '');
|
||||
opt.set(dom_prefix + 'reality_shortId', queryParam.sid || '');
|
||||
opt.set(dom_prefix + 'reality_spiderX', queryParam.spx || '');
|
||||
opt.set(dom_prefix + 'reality_mldsa65Verify', queryParam.pqv || '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1362,6 +1366,7 @@ local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sin
|
||||
opt.set(dom_prefix + 'reality_publicKey', queryParam.pbk || '');
|
||||
opt.set(dom_prefix + 'reality_shortId', queryParam.sid || '');
|
||||
opt.set(dom_prefix + 'reality_spiderX', queryParam.spx || '');
|
||||
opt.set(dom_prefix + 'reality_mldsa65Verify', queryParam.pqv || '');
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -445,7 +445,7 @@ msgstr "负载均衡策略"
|
||||
msgid "Fallback Node"
|
||||
msgstr "后备节点"
|
||||
|
||||
msgid "Use Custome Probe URL"
|
||||
msgid "Use Custom Probe URL"
|
||||
msgstr "使用自定义探测网址"
|
||||
|
||||
msgid "By default the built-in probe URL will be used, enable this option to use a custom probe URL."
|
||||
|
@@ -825,6 +825,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.reality_publicKey = params.pbk or nil
|
||||
result.reality_shortId = params.sid or nil
|
||||
result.reality_spiderX = params.spx or nil
|
||||
result.reality_mldsa65Verify = params.pqv or nil
|
||||
end
|
||||
end
|
||||
params.allowinsecure = params.allowinsecure or params.insecure
|
||||
@@ -1201,6 +1202,7 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.reality_publicKey = params.pbk or nil
|
||||
result.reality_shortId = params.sid or nil
|
||||
result.reality_spiderX = params.spx or nil
|
||||
result.reality_mldsa65Verify = params.pqv or nil
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -18,10 +18,14 @@ config homeproxy 'infra'
|
||||
option tproxy_mark '101'
|
||||
option tun_mark '102'
|
||||
|
||||
config homeproxy 'migration'
|
||||
option crontab '1'
|
||||
|
||||
config homeproxy 'config'
|
||||
option main_node 'nil'
|
||||
option main_udp_node 'same'
|
||||
option dns_server '8.8.8.8'
|
||||
option china_dns_server '223.5.5.5'
|
||||
option routing_mode 'bypass_mainland_china'
|
||||
option routing_port 'common'
|
||||
option proxy_mode 'redirect_tproxy'
|
||||
|
@@ -16,6 +16,7 @@ const uciconfig = 'homeproxy';
|
||||
uci.load(uciconfig);
|
||||
|
||||
const uciinfra = 'infra',
|
||||
ucimigration = 'migration',
|
||||
ucimain = 'config',
|
||||
ucinode = 'node',
|
||||
ucidns = 'dns',
|
||||
@@ -31,12 +32,14 @@ if (uci.get(uciconfig, uciinfra, 'china_dns_port'))
|
||||
|
||||
/* chinadns server now only accepts single server */
|
||||
const china_dns_server = uci.get(uciconfig, ucimain, 'china_dns_server');
|
||||
if (china_dns_server === 'wan_114')
|
||||
if (type(china_dns_server) === 'array') {
|
||||
uci.set(uciconfig, ucimain, 'china_dns_server', china_dns_server[0]);
|
||||
} else {
|
||||
if (china_dns_server === 'wan_114')
|
||||
uci.set(uciconfig, ucimain, 'china_dns_server', '114.114.114.114');
|
||||
else if (match(china_dns_server, /,/))
|
||||
else if (match(china_dns_server, /,/))
|
||||
uci.set(uciconfig, ucimain, 'china_dns_server', split(china_dns_server, ',')[0]);
|
||||
else if (match(china_dns_server, / /))
|
||||
uci.set(uciconfig, ucimain, 'china_dns_server', split(china_dns_server, ' ')[0]);
|
||||
}
|
||||
|
||||
/* github_token option has been moved to config section */
|
||||
const github_token = uci.get(uciconfig, uciinfra, 'github_token');
|
||||
@@ -50,6 +53,17 @@ const tun_gso = uci.get(uciconfig, uciinfra, 'tun_gso');
|
||||
if (tun_gso || tun_gso === '0')
|
||||
uci.delete(uciconfig, uciinfra, 'tun_gso');
|
||||
|
||||
/* create migration section */
|
||||
if (!uci.get(uciconfig, ucimigration))
|
||||
uci.set(uciconfig, ucimigration, uciconfig);
|
||||
|
||||
/* delete old crontab command */
|
||||
const migration_crontab = uci.get(uciconfig, ucimigration, 'crontab');
|
||||
if (!migration_crontab) {
|
||||
system('sed -i "/update_crond.sh/d" "/etc/crontabs/root" 2>"/dev/null"');
|
||||
uci.set(uciconfig, ucimigration, 'crontab', '1');
|
||||
}
|
||||
|
||||
/* empty value defaults to all ports now */
|
||||
if (uci.get(uciconfig, ucimain, 'routing_port') === 'all')
|
||||
uci.delete(uciconfig, ucimain, 'routing_port');
|
||||
|
@@ -67,8 +67,8 @@ start_service() {
|
||||
config_get_bool auto_update "subscription" "auto_update" "0"
|
||||
if [ "$auto_update" = "1" ]; then
|
||||
config_get auto_update_time "subscription" "auto_update_time" "2"
|
||||
sed -i "/update_crond.sh/d" "/etc/crontabs/root" 2>"/dev/null"
|
||||
echo -e "0 $auto_update_time * * * $HP_DIR/scripts/update_crond.sh" >> "/etc/crontabs/root"
|
||||
sed -i "/#${CONF}_autosetup/d" "/etc/crontabs/root" 2>"/dev/null"
|
||||
echo -e "0 $auto_update_time * * * $HP_DIR/scripts/update_crond.sh #${CONF}_autosetup" >> "/etc/crontabs/root"
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
|
||||
@@ -246,7 +246,7 @@ start_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
sed -i "/update_crond.sh/d" "/etc/crontabs/root" 2>"/dev/null"
|
||||
sed -i "/#${CONF}_autosetup/d" "/etc/crontabs/root" 2>"/dev/null"
|
||||
/etc/init.d/cron restart >"/dev/null" 2>&1
|
||||
|
||||
# Setup firewall
|
||||
|
@@ -132,7 +132,7 @@ if api.compare_versions(xray_version, ">=", "1.8.10") then
|
||||
end
|
||||
|
||||
-- 探测地址
|
||||
local ucpu = s:option(Flag, _n("useCustomProbeUrl"), translate("Use Custome Probe URL"), translate("By default the built-in probe URL will be used, enable this option to use a custom probe URL."))
|
||||
local ucpu = s:option(Flag, _n("useCustomProbeUrl"), translate("Use Custom Probe URL"), translate("By default the built-in probe URL will be used, enable this option to use a custom probe URL."))
|
||||
ucpu:depends({ [_n("balancingStrategy")] = "leastPing" })
|
||||
ucpu:depends({ [_n("balancingStrategy")] = "leastLoad" })
|
||||
|
||||
|
@@ -1,11 +1,13 @@
|
||||
local _M = {}
|
||||
|
||||
local function gh_release_url(self)
|
||||
return "https://api.github.com/repos/" .. self.repo .. "/releases/latest"
|
||||
--return "https://api.github.com/repos/" .. self.repo .. "/releases/latest"
|
||||
return "https://github.com/xiaorouji/openwrt-passwall-packages/releases/download/api-cache/" .. string.lower(self.name) .. "-release-api.json"
|
||||
end
|
||||
|
||||
local function gh_pre_release_url(self)
|
||||
return "https://api.github.com/repos/" .. self.repo .. "/releases?per_page=1"
|
||||
--return "https://api.github.com/repos/" .. self.repo .. "/releases?per_page=1"
|
||||
return "https://github.com/xiaorouji/openwrt-passwall-packages/releases/download/api-cache/" .. string.lower(self.name) .. "-pre-release-api.json"
|
||||
end
|
||||
|
||||
-- 排序顺序定义
|
||||
|
@@ -445,7 +445,7 @@ msgstr "负载均衡策略"
|
||||
msgid "Fallback Node"
|
||||
msgstr "后备节点"
|
||||
|
||||
msgid "Use Custome Probe URL"
|
||||
msgid "Use Custom Probe URL"
|
||||
msgstr "使用自定义探测网址"
|
||||
|
||||
msgid "By default the built-in probe URL will be used, enable this option to use a custom probe URL."
|
||||
|
@@ -1124,6 +1124,28 @@ if is_finded("xray") then
|
||||
o:value("", translate("disable"))
|
||||
o:depends({type = "v2ray", tls = true})
|
||||
o:depends({type = "v2ray", reality = true})
|
||||
|
||||
o = s:option(Flag, "enable_mldsa65verify", translate("Enable ML-DSA-65(optional)"))
|
||||
o.description = translate("This item might be an empty string.")
|
||||
o.rmempty = true
|
||||
o.default = "0"
|
||||
o:depends({type = "v2ray", v2ray_protocol = "vless", reality = true})
|
||||
|
||||
o = s:option(Value, "reality_mldsa65verify", translate("ML-DSA-65 Public key"))
|
||||
o.description = translate(
|
||||
"<font><b>" .. translate("The client has not configured mldsa65Verify, but it will not perform the \"additional verification\" step and can still connect normally, see:") .. "</b></font>" ..
|
||||
" <a href='https://github.com/XTLS/Xray-core/pull/4915' target='_blank'>" ..
|
||||
"<font style='color:green'><b>" .. translate("Click to the page") .. "</b></font></a>")
|
||||
o:depends("enable_mldsa65verify", true)
|
||||
o.rmempty = true
|
||||
o.validate = function(self, value)
|
||||
-- 清理空行和多余换行
|
||||
value = value:gsub("\r\n", "\n"):gsub("^[ \t]*\n", ""):gsub("\n[ \t]*$", ""):gsub("\n[ \t]*\n", "\n")
|
||||
if value:sub(-1) == "\n" then
|
||||
value = value:sub(1, -2)
|
||||
end
|
||||
return value
|
||||
end
|
||||
end
|
||||
|
||||
o = s:option(Value, "tls_host", translate("TLS Host"))
|
||||
|
@@ -550,6 +550,11 @@ function import_ssr_url(btn, urlname, sid) {
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.reality_publickey', params.get("pbk") ? decodeURIComponent(params.get("pbk")) : "");
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.reality_shortid', params.get("sid") || "");
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.reality_spiderx', params.get("spx") ? decodeURIComponent(params.get("spx")) : "");
|
||||
if (params.get("pqv") && params.get("pqv").trim() !== "") {
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', true); // 设置 enable_mldsa65verify 为 true
|
||||
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.enable_mldsa65verify', event); // 触发事件
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.reality_mldsa65verify', params.get("pqv") || "");
|
||||
}
|
||||
}
|
||||
setElementValue('cbid.shadowsocksr.' + sid + '.tls_flow', params.get("flow") || "none");
|
||||
dispatchEventIfExists('cbid.shadowsocksr.' + sid + '.tls_flow', event);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -230,6 +230,7 @@ end
|
||||
shortId = server.reality_shortid,
|
||||
spiderX = server.reality_spiderx,
|
||||
fingerprint = server.fingerprint,
|
||||
mldsa65Verify = (server.enable_mldsa65verify == '1') and server.reality_mldsa65verify or nil,
|
||||
serverName = server.tls_host
|
||||
} or nil,
|
||||
rawSettings = (server.transport == "raw" or server.transport == "tcp") and {
|
||||
|
@@ -710,6 +710,9 @@ local function processData(szType, content)
|
||||
result.reality_publickey = params.pbk and UrlDecode(params.pbk) or nil
|
||||
result.reality_shortid = params.sid
|
||||
result.reality_spiderx = params.spx and UrlDecode(params.spx) or nil
|
||||
-- 检查 pqv 参数是否存在且非空
|
||||
result.enable_mldsa65verify = (params.pqv and params.pqv ~= "") and "1" or nil
|
||||
result.reality_mldsa65verify = (params.pqv and params.pqv ~= "") and params.pqv or nil
|
||||
if result.transport == "ws" then
|
||||
result.ws_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil
|
||||
result.ws_path = params.path and UrlDecode(params.path) or "/"
|
||||
|
@@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray-core
|
||||
PKG_VERSION:=25.7.25
|
||||
PKG_VERSION:=25.7.26
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=f157afdae24d9abe49a5bb1745b8586f9b99f47c0633b9ca7000121829ca7e62
|
||||
PKG_HASH:=99f9bc67fd22a6e4fde277a4ba05fd873146154851aeebb6b4f406a59d3b0bc3
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MPL-2.0
|
||||
|
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
version = "5.37.0"
|
||||
version = "5.38.0"
|
||||
build = "Custom"
|
||||
codename = "V2Fly, a community-driven edition of V2Ray."
|
||||
intro = "A unified platform for anti-censorship."
|
||||
|
@@ -18,14 +18,14 @@ require (
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/improbable-eng/grpc-web v0.15.0
|
||||
github.com/jhump/protoreflect v1.17.0
|
||||
github.com/miekg/dns v1.1.66
|
||||
github.com/miekg/dns v1.1.67
|
||||
github.com/mustafaturan/bus v1.0.2
|
||||
github.com/pelletier/go-toml v1.9.5
|
||||
github.com/pion/dtls/v2 v2.2.12
|
||||
github.com/pion/transport/v2 v2.2.10
|
||||
github.com/pires/go-proxyproto v0.8.1
|
||||
github.com/quic-go/quic-go v0.53.0
|
||||
github.com/refraction-networking/utls v1.7.3
|
||||
github.com/quic-go/quic-go v0.54.0
|
||||
github.com/refraction-networking/utls v1.8.0
|
||||
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/v2fly/BrowserBridge v0.0.0-20210430233438-0570fc1d7d08
|
||||
@@ -37,11 +37,11 @@ require (
|
||||
github.com/xiaokangwang/VLite v0.0.0-20220418190619-cff95160a432
|
||||
go.starlark.net v0.0.0-20230612165344-9532f5667272
|
||||
go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35
|
||||
golang.org/x/crypto v0.39.0
|
||||
golang.org/x/net v0.41.0
|
||||
golang.org/x/sync v0.15.0
|
||||
golang.org/x/sys v0.33.0
|
||||
google.golang.org/grpc v1.73.0
|
||||
golang.org/x/crypto v0.40.0
|
||||
golang.org/x/net v0.42.0
|
||||
golang.org/x/sync v0.16.0
|
||||
golang.org/x/sys v0.34.0
|
||||
google.golang.org/grpc v1.74.2
|
||||
google.golang.org/protobuf v1.36.6
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
gvisor.dev/gvisor v0.0.0-20231020174304-b8a429915ff1
|
||||
@@ -56,7 +56,6 @@ require (
|
||||
github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d // indirect
|
||||
github.com/bufbuild/protocompile v0.14.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 // indirect
|
||||
@@ -89,9 +88,9 @@ require (
|
||||
go.uber.org/mock v0.5.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
|
||||
golang.org/x/mod v0.25.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.33.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
|
||||
golang.org/x/tools v0.34.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect
|
||||
nhooyr.io/websocket v1.8.6 // indirect
|
||||
)
|
||||
|
@@ -65,8 +65,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
|
||||
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
@@ -128,8 +126,8 @@ github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgO
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
@@ -319,8 +317,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE=
|
||||
github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE=
|
||||
github.com/miekg/dns v1.1.67 h1:kg0EHj0G4bfT5/oOys6HhZw4vmMlnoZ+gDu8tJ/AlI0=
|
||||
github.com/miekg/dns v1.1.67/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
@@ -442,11 +440,11 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
|
||||
github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
|
||||
github.com/quic-go/quic-go v0.53.0 h1:QHX46sISpG2S03dPeZBgVIZp8dGagIaiu2FiVYvpCZI=
|
||||
github.com/quic-go/quic-go v0.53.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
|
||||
github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg=
|
||||
github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/refraction-networking/utls v1.7.3 h1:L0WRhHY7Oq1T0zkdzVZMR6zWZv+sXbHB9zcuvsAEqCo=
|
||||
github.com/refraction-networking/utls v1.7.3/go.mod h1:TUhh27RHMGtQvjQq+RyO11P6ZNQNBb3N0v7wsEjKAIQ=
|
||||
github.com/refraction-networking/utls v1.8.0 h1:L38krhiTAyj9EeiQQa2sg+hYb4qwLCqdMcpZrRfbONE=
|
||||
github.com/refraction-networking/utls v1.8.0/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstvQsPGkxUsCd2KWxErBblirPizecHcpD3ffK+s=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
@@ -552,16 +550,16 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
|
||||
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
|
||||
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
|
||||
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
|
||||
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
|
||||
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
|
||||
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
|
||||
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
go.starlark.net v0.0.0-20230612165344-9532f5667272 h1:2/wtqS591wZyD2OsClsVBKRPEvBsQt/Js+fsCiYhwu8=
|
||||
go.starlark.net v0.0.0-20230612165344-9532f5667272/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@@ -592,8 +590,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@@ -655,8 +653,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -670,8 +668,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -719,8 +717,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -740,8 +738,8 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -777,8 +775,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=
|
||||
golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI=
|
||||
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
|
||||
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -807,8 +805,8 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvx
|
||||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
|
||||
@@ -823,8 +821,8 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
|
||||
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
|
||||
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
|
||||
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@@ -142,12 +142,12 @@ func (d *persistentMirrorTLSDialer) init(ctx context.Context, config *Config) er
|
||||
}
|
||||
}
|
||||
|
||||
if d.config.ConnectionEnrollment != nil {
|
||||
if d.config.ConnectionEnrolment != nil {
|
||||
enrollmentServerIdentifier, err := mirrorenrollment.DeriveEnrollmentServerIdentifier(d.config.PrimaryKey)
|
||||
if err != nil {
|
||||
return newError("failed to derive enrollment server identifier").Base(err).AtError()
|
||||
}
|
||||
d.enrollmentConfirmationClient, err = mirrorenrollment.NewEnrollmentConfirmationClient(d.ctx, d.config.ConnectionEnrollment, enrollmentServerIdentifier)
|
||||
d.enrollmentConfirmationClient, err = mirrorenrollment.NewEnrollmentConfirmationClient(d.ctx, d.config.ConnectionEnrolment, enrollmentServerIdentifier)
|
||||
if err != nil {
|
||||
return newError("failed to create enrollment confirmation client").Base(err).AtError()
|
||||
}
|
||||
@@ -210,7 +210,7 @@ type verifyConnectionEnrollment interface {
|
||||
|
||||
func (d *persistentMirrorTLSDialer) handleIncomingReadyConnection(conn internet.Connection) {
|
||||
go func() {
|
||||
if d.config.ConnectionEnrollment != nil {
|
||||
if d.config.ConnectionEnrolment != nil {
|
||||
if enrollableConn, ok := conn.(verifyConnectionEnrollment); ok {
|
||||
if d.enrollmentConfirmationClient != nil {
|
||||
err := enrollableConn.VerifyConnectionEnrollmentWithProcessor(d.enrollmentConfirmationClient)
|
||||
|
@@ -125,7 +125,7 @@ type Config struct {
|
||||
ExplicitNonceCiphersuites []uint32 `protobuf:"varint,7,rep,packed,name=explicit_nonce_ciphersuites,json=explicitNonceCiphersuites,proto3" json:"explicit_nonce_ciphersuites,omitempty"`
|
||||
DeferInstanceDerivedWriteTime *TimeSpec `protobuf:"bytes,8,opt,name=defer_instance_derived_write_time,json=deferInstanceDerivedWriteTime,proto3" json:"defer_instance_derived_write_time,omitempty"`
|
||||
TransportLayerPadding *TransportLayerPadding `protobuf:"bytes,9,opt,name=transport_layer_padding,json=transportLayerPadding,proto3" json:"transport_layer_padding,omitempty"`
|
||||
ConnectionEnrollment *mirrorenrollment.Config `protobuf:"bytes,10,opt,name=connection_enrollment,json=connectionEnrollment,proto3" json:"connection_enrollment,omitempty"`
|
||||
ConnectionEnrolment *mirrorenrollment.Config `protobuf:"bytes,10,opt,name=connection_enrolment,json=connectionEnrolment,proto3" json:"connection_enrolment,omitempty"`
|
||||
SequenceWatermarkingEnabled bool `protobuf:"varint,11,opt,name=sequence_watermarking_enabled,json=sequenceWatermarkingEnabled,proto3" json:"sequence_watermarking_enabled,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -224,9 +224,9 @@ func (x *Config) GetTransportLayerPadding() *TransportLayerPadding {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Config) GetConnectionEnrollment() *mirrorenrollment.Config {
|
||||
func (x *Config) GetConnectionEnrolment() *mirrorenrollment.Config {
|
||||
if x != nil {
|
||||
return x.ConnectionEnrollment
|
||||
return x.ConnectionEnrolment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -247,7 +247,7 @@ const file_transport_internet_tlsmirror_server_config_proto_rawDesc = "" +
|
||||
"\x10base_nanoseconds\x18\x01 \x01(\x04R\x0fbaseNanoseconds\x12Q\n" +
|
||||
"%uniform_random_multiplier_nanoseconds\x18\x02 \x01(\x04R\"uniformRandomMultiplierNanoseconds\"1\n" +
|
||||
"\x15TransportLayerPadding\x12\x18\n" +
|
||||
"\aenabled\x18\x01 \x01(\bR\aenabled\"\xf1\x06\n" +
|
||||
"\aenabled\x18\x01 \x01(\bR\aenabled\"\xef\x06\n" +
|
||||
"\x06Config\x12'\n" +
|
||||
"\x0fforward_address\x18\x01 \x01(\tR\x0eforwardAddress\x12!\n" +
|
||||
"\fforward_port\x18\x02 \x01(\rR\vforwardPort\x12\x1f\n" +
|
||||
@@ -259,9 +259,9 @@ const file_transport_internet_tlsmirror_server_config_proto_rawDesc = "" +
|
||||
"primaryKey\x12>\n" +
|
||||
"\x1bexplicit_nonce_ciphersuites\x18\a \x03(\rR\x19explicitNonceCiphersuites\x12\x82\x01\n" +
|
||||
"!defer_instance_derived_write_time\x18\b \x01(\v28.v2ray.core.transport.internet.tlsmirror.server.TimeSpecR\x1ddeferInstanceDerivedWriteTime\x12}\n" +
|
||||
"\x17transport_layer_padding\x18\t \x01(\v2E.v2ray.core.transport.internet.tlsmirror.server.TransportLayerPaddingR\x15transportLayerPadding\x12u\n" +
|
||||
"\x15connection_enrollment\x18\n" +
|
||||
" \x01(\v2@.v2ray.core.transport.internet.tlsmirror.mirrorenrollment.ConfigR\x14connectionEnrollment\x12B\n" +
|
||||
"\x17transport_layer_padding\x18\t \x01(\v2E.v2ray.core.transport.internet.tlsmirror.server.TransportLayerPaddingR\x15transportLayerPadding\x12s\n" +
|
||||
"\x14connection_enrolment\x18\n" +
|
||||
" \x01(\v2@.v2ray.core.transport.internet.tlsmirror.mirrorenrollment.ConfigR\x13connectionEnrolment\x12B\n" +
|
||||
"\x1dsequence_watermarking_enabled\x18\v \x01(\bR\x1bsequenceWatermarkingEnabled:'\x82\xb5\x18#\n" +
|
||||
"\ttransport\x12\ttlsmirror\x8a\xff)\ttlsmirrorB\xab\x01\n" +
|
||||
"2com.v2ray.core.transport.internet.tlsmirror.serverP\x01ZBgithub.com/v2fly/v2ray-core/v5/transport/internet/tlsmirror/server\xaa\x02.V2Ray.Core.Transport.Internet.Tlsmirror.Serverb\x06proto3"
|
||||
@@ -290,7 +290,7 @@ var file_transport_internet_tlsmirror_server_config_proto_depIdxs = []int32{
|
||||
3, // 0: v2ray.core.transport.internet.tlsmirror.server.Config.embedded_traffic_generator:type_name -> v2ray.core.transport.internet.tlsmirror.tlstrafficgen.Config
|
||||
0, // 1: v2ray.core.transport.internet.tlsmirror.server.Config.defer_instance_derived_write_time:type_name -> v2ray.core.transport.internet.tlsmirror.server.TimeSpec
|
||||
1, // 2: v2ray.core.transport.internet.tlsmirror.server.Config.transport_layer_padding:type_name -> v2ray.core.transport.internet.tlsmirror.server.TransportLayerPadding
|
||||
4, // 3: v2ray.core.transport.internet.tlsmirror.server.Config.connection_enrollment:type_name -> v2ray.core.transport.internet.tlsmirror.mirrorenrollment.Config
|
||||
4, // 3: v2ray.core.transport.internet.tlsmirror.server.Config.connection_enrolment:type_name -> v2ray.core.transport.internet.tlsmirror.mirrorenrollment.Config
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
|
@@ -42,7 +42,7 @@ message Config {
|
||||
|
||||
TransportLayerPadding transport_layer_padding = 9;
|
||||
|
||||
v2ray.core.transport.internet.tlsmirror.mirrorenrollment.Config connection_enrollment = 10;
|
||||
v2ray.core.transport.internet.tlsmirror.mirrorenrollment.Config connection_enrolment = 10;
|
||||
|
||||
bool sequence_watermarking_enabled = 11;
|
||||
|
||||
|
@@ -126,7 +126,7 @@ func (s *Server) accept(clientConn net.Conn, serverConn net.Conn) {
|
||||
sequenceWatermarkEnabled: s.config.SequenceWatermarkingEnabled,
|
||||
}
|
||||
|
||||
if s.config.ConnectionEnrollment != nil {
|
||||
if s.config.ConnectionEnrolment != nil {
|
||||
conn.connectionEnrollmentEnabled = true
|
||||
conn.connectionEnrollmentProcessor = s.enrollmentConfirmationProcessor
|
||||
}
|
||||
@@ -146,16 +146,16 @@ func (s *Server) init() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if s.config.ConnectionEnrollment != nil {
|
||||
if s.config.ConnectionEnrolment != nil {
|
||||
s.enrollmentConfirmationListener = NewOutboundListener()
|
||||
s.enrollmentConfirmationOutbound = NewOutbound(s.config.ConnectionEnrollment.PrimaryIngressOutbound,
|
||||
s.enrollmentConfirmationOutbound = NewOutbound(s.config.ConnectionEnrolment.PrimaryIngressOutbound,
|
||||
s.enrollmentConfirmationListener)
|
||||
|
||||
if err := s.enrollmentConfirmationOutbound.Start(); err != nil {
|
||||
return newError("failed to start enrollment confirmation outbound").Base(err).AtWarning()
|
||||
}
|
||||
|
||||
if err := s.obm.RemoveHandler(context.Background(), s.config.ConnectionEnrollment.PrimaryIngressOutbound); err != nil {
|
||||
if err := s.obm.RemoveHandler(context.Background(), s.config.ConnectionEnrolment.PrimaryIngressOutbound); err != nil {
|
||||
newError("failed to remove existing handler").Base(err).AtDebug().WriteToLog()
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ func (s *Server) init() error {
|
||||
return newError("failed to create enrollment confirmation processor").Base(err).AtError()
|
||||
}
|
||||
|
||||
s.enrollmentConfirmationServer, err = mirrorenrollment.NewEnrollmentConfirmationServer(s.ctx, s.config.ConnectionEnrollment,
|
||||
s.enrollmentConfirmationServer, err = mirrorenrollment.NewEnrollmentConfirmationServer(s.ctx, s.config.ConnectionEnrolment,
|
||||
s.enrollmentConfirmationProcessor)
|
||||
if err != nil {
|
||||
return newError("failed to create enrollment confirmation server").Base(err).AtError()
|
||||
|
@@ -9,6 +9,7 @@ public class CoreAdminHandler
|
||||
private static readonly Lazy<CoreAdminHandler> _instance = new(() => new());
|
||||
public static CoreAdminHandler Instance => _instance.Value;
|
||||
private Config _config;
|
||||
private readonly string _sudoAccessText = "SUDO_ACCESS_VERIFIED";
|
||||
private Action<bool, string>? _updateFunc;
|
||||
private int _linuxSudoPid = -1;
|
||||
|
||||
@@ -50,27 +51,30 @@ public class CoreAdminHandler
|
||||
}
|
||||
};
|
||||
|
||||
proc.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data.IsNotEmpty())
|
||||
{
|
||||
UpdateFunc(false, e.Data + Environment.NewLine);
|
||||
}
|
||||
};
|
||||
proc.ErrorDataReceived += (sender, e) =>
|
||||
var sudoVerified = false;
|
||||
DataReceivedEventHandler dataHandler = (sender, e) =>
|
||||
{
|
||||
if (e.Data.IsNotEmpty())
|
||||
{
|
||||
if (!sudoVerified && e.Data.Contains(_sudoAccessText))
|
||||
{
|
||||
sudoVerified = true;
|
||||
UpdateFunc(false, ResUI.SudoPwdVerfiedSuccessTip + Environment.NewLine);
|
||||
return;
|
||||
}
|
||||
UpdateFunc(false, e.Data + Environment.NewLine);
|
||||
}
|
||||
};
|
||||
|
||||
proc.OutputDataReceived += dataHandler;
|
||||
proc.ErrorDataReceived += dataHandler;
|
||||
|
||||
proc.Start();
|
||||
proc.BeginOutputReadLine();
|
||||
proc.BeginErrorReadLine();
|
||||
|
||||
await Task.Delay(10);
|
||||
await proc.StandardInput.WriteLineAsync();
|
||||
await proc.StandardInput.WriteLineAsync(AppHandler.Instance.LinuxSudoPwd);
|
||||
await Task.Delay(10);
|
||||
await proc.StandardInput.WriteLineAsync(AppHandler.Instance.LinuxSudoPwd);
|
||||
|
||||
@@ -115,7 +119,7 @@ public class CoreAdminHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($"sudo -S {cmdLine}");
|
||||
sb.AppendLine($"sudo -S echo \"{_sudoAccessText}\" && sudo -S {cmdLine}");
|
||||
}
|
||||
|
||||
await File.WriteAllTextAsync(shFilePath, sb.ToString());
|
||||
|
@@ -280,20 +280,15 @@ public class CoreHandler
|
||||
|
||||
if (displayLog)
|
||||
{
|
||||
proc.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (e.Data.IsNotEmpty())
|
||||
{
|
||||
UpdateFunc(false, e.Data + Environment.NewLine);
|
||||
}
|
||||
};
|
||||
proc.ErrorDataReceived += (sender, e) =>
|
||||
DataReceivedEventHandler dataHandler = (sender, e) =>
|
||||
{
|
||||
if (e.Data.IsNotEmpty())
|
||||
{
|
||||
UpdateFunc(false, e.Data + Environment.NewLine);
|
||||
}
|
||||
};
|
||||
proc.OutputDataReceived += dataHandler;
|
||||
proc.ErrorDataReceived += dataHandler;
|
||||
}
|
||||
proc.Start();
|
||||
|
||||
|
@@ -24,7 +24,7 @@ public class Hysteria2Fmt : BaseFmt
|
||||
item.Path = Utils.UrlDecode(query["obfs-password"] ?? "");
|
||||
item.AllowInsecure = (query["insecure"] ?? "") == "1" ? "true" : "false";
|
||||
|
||||
item.Ports = Utils.UrlDecode(query["mport"] ?? "").Replace('-', ':');
|
||||
item.Ports = Utils.UrlDecode(query["mport"] ?? "");
|
||||
|
||||
return item;
|
||||
}
|
||||
|
9
v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
9
v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
@@ -2202,6 +2202,15 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Sudo password has been verified successfully, please ignore the incorrect password prompts! 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SudoPwdVerfiedSuccessTip {
|
||||
get {
|
||||
return ResourceManager.GetString("SudoPwdVerfiedSuccessTip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Address 的本地化字符串。
|
||||
/// </summary>
|
||||
|
@@ -1395,4 +1395,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
|
||||
</data>
|
||||
</root>
|
@@ -1395,4 +1395,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
|
||||
</data>
|
||||
</root>
|
@@ -1395,4 +1395,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
|
||||
</data>
|
||||
</root>
|
@@ -1395,4 +1395,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>Can fill in the configuration remarks, please make sure it exist and are unique</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>Sudo password has been verified successfully, please ignore the incorrect password prompts!</value>
|
||||
</data>
|
||||
</root>
|
@@ -1392,4 +1392,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>可以填写配置文件别名,请确保存在并唯一</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>sudo 密码已经验证成功,请忽略错误密码提示!</value>
|
||||
</data>
|
||||
</root>
|
@@ -1392,4 +1392,7 @@
|
||||
<data name="TbRuleOutboundTagTip" xml:space="preserve">
|
||||
<value>可以填寫設定檔別名,請確保存在並唯一</value>
|
||||
</data>
|
||||
<data name="SudoPwdVerfiedSuccessTip" xml:space="preserve">
|
||||
<value>sudo 密碼已經驗證成功,請忽略錯誤密碼提示!</value>
|
||||
</data>
|
||||
</root>
|
@@ -706,12 +706,17 @@ public class CoreConfigSingboxService
|
||||
|
||||
outbound.up_mbps = _config.HysteriaItem.UpMbps > 0 ? _config.HysteriaItem.UpMbps : null;
|
||||
outbound.down_mbps = _config.HysteriaItem.DownMbps > 0 ? _config.HysteriaItem.DownMbps : null;
|
||||
if (node.Ports.IsNotEmpty())
|
||||
if (node.Ports.IsNotEmpty() && (node.Ports.Contains(':') || node.Ports.Contains('-') || node.Ports.Contains(',')))
|
||||
{
|
||||
outbound.server_port = null;
|
||||
outbound.server_ports = node.Ports.Split(',')
|
||||
.Where(p => p.Trim().IsNotEmpty())
|
||||
.Select(p => p.Replace('-', ':'))
|
||||
.Select(p => p.Trim())
|
||||
.Where(p => p.IsNotEmpty())
|
||||
.Select(p =>
|
||||
{
|
||||
var port = p.Replace('-', ':');
|
||||
return port.Contains(':') ? port : $"{port}:{port}";
|
||||
})
|
||||
.ToList();
|
||||
outbound.hop_interval = _config.HysteriaItem.HopInterval > 0 ? $"{_config.HysteriaItem.HopInterval}s" : null;
|
||||
}
|
||||
|
@@ -1,14 +1,13 @@
|
||||
module github.com/2dust/AndroidLibXrayLite
|
||||
|
||||
go 1.24.3
|
||||
go 1.24.5
|
||||
|
||||
require (
|
||||
github.com/xtls/xray-core v1.250608.1-0.20250724021908-4f45c5faa5f1
|
||||
github.com/xtls/xray-core v1.250726.0
|
||||
golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 // indirect
|
||||
github.com/andybalholm/brotli v1.1.1 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 // indirect
|
||||
@@ -19,6 +18,7 @@ require (
|
||||
github.com/klauspost/compress v1.18.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/miekg/dns v1.1.67 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pires/go-proxyproto v0.8.1 // indirect
|
||||
github.com/quic-go/qpack v0.5.1 // indirect
|
||||
@@ -32,7 +32,7 @@ require (
|
||||
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect
|
||||
github.com/vishvananda/netlink v1.3.1 // indirect
|
||||
github.com/vishvananda/netns v0.0.5 // indirect
|
||||
github.com/xtls/reality v0.0.0-20250723121014-c6320729d93b // indirect
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7 // indirect
|
||||
go.uber.org/mock v0.5.2 // indirect
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
|
||||
golang.org/x/crypto v0.40.0 // indirect
|
||||
|
@@ -1,5 +1,3 @@
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
|
||||
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
|
||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
||||
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
|
||||
@@ -73,10 +71,10 @@ github.com/vishvananda/netlink v1.3.1 h1:3AEMt62VKqz90r0tmNhog0r/PpWKmrEShJU0wJW
|
||||
github.com/vishvananda/netlink v1.3.1/go.mod h1:ARtKouGSTGchR8aMwmkzC0qiNPrrWO5JS/XMVl45+b4=
|
||||
github.com/vishvananda/netns v0.0.5 h1:DfiHV+j8bA32MFM7bfEunvT8IAqQ/NzSJHtcmW5zdEY=
|
||||
github.com/vishvananda/netns v0.0.5/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/xtls/reality v0.0.0-20250723121014-c6320729d93b h1:HOOsQYu7/EzvpegY7uHiaeI9H/6OsHAOkREnJthdUW8=
|
||||
github.com/xtls/reality v0.0.0-20250723121014-c6320729d93b/go.mod h1:XxvnCCgBee4WWE0bc4E+a7wbk8gkJ/rS0vNVNtC5qp0=
|
||||
github.com/xtls/xray-core v1.250608.1-0.20250724021908-4f45c5faa5f1 h1:5YFdWAwmW/pB7aMltnUmsRC8QY37817Q2m9WqVUVxPU=
|
||||
github.com/xtls/xray-core v1.250608.1-0.20250724021908-4f45c5faa5f1/go.mod h1:dqSs+9mmzvOZRFxTaS0ktkQYG8TD9naApQPdnp/MUzA=
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7 h1:Ript0vN+nSO33+Vj4n0mgNY5M+oOxFQJdrJ1VnwTBO0=
|
||||
github.com/xtls/reality v0.0.0-20250725142056-5b52a03d4fb7/go.mod h1:XxvnCCgBee4WWE0bc4E+a7wbk8gkJ/rS0vNVNtC5qp0=
|
||||
github.com/xtls/xray-core v1.250726.0 h1:uTUHUt/CQ1JQLip1pLkiwoS0pMvl6oCHJgur4M4orWQ=
|
||||
github.com/xtls/xray-core v1.250726.0/go.mod h1:z2vn2o30flYEgpSz1iEhdZP1I46UZ3+gXINZyohH3yE=
|
||||
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
|
||||
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
|
@@ -12,8 +12,8 @@ android {
|
||||
applicationId = "com.v2ray.ang"
|
||||
minSdk = 21
|
||||
targetSdk = 35
|
||||
versionCode = 660
|
||||
versionName = "1.10.10"
|
||||
versionCode = 661
|
||||
versionName = "1.10.11"
|
||||
multiDexEnabled = true
|
||||
|
||||
val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';')
|
||||
|
@@ -19,7 +19,7 @@ import (
|
||||
var (
|
||||
Version_x byte = 25
|
||||
Version_y byte = 7
|
||||
Version_z byte = 25
|
||||
Version_z byte = 26
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -3,7 +3,6 @@ module github.com/xtls/xray-core
|
||||
go 1.24
|
||||
|
||||
require (
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0
|
||||
github.com/cloudflare/circl v1.6.1
|
||||
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344
|
||||
github.com/golang/mock v1.7.0-rc.1
|
||||
|
@@ -1,5 +1,3 @@
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0 h1:Wo41lDOevRJSGpevP+8Pk5bANX7fJacO2w04aqLiC5I=
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0/go.mod h1:FVGavL/QEBQDcBpr3fAojoK17xX5k9bicBphrOpP7uM=
|
||||
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
|
||||
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
|
||||
|
@@ -412,6 +412,8 @@ type TLSConfig struct {
|
||||
MasterKeyLog string `json:"masterKeyLog"`
|
||||
ServerNameToVerify string `json:"serverNameToVerify"`
|
||||
VerifyPeerCertInNames []string `json:"verifyPeerCertInNames"`
|
||||
ECHConfigList string `json:"echConfigList"`
|
||||
ECHServerKeys string `json:"echServerKeys"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
@@ -483,6 +485,16 @@ func (c *TLSConfig) Build() (proto.Message, error) {
|
||||
}
|
||||
config.VerifyPeerCertInNames = c.VerifyPeerCertInNames
|
||||
|
||||
config.EchConfigList = c.ECHConfigList
|
||||
|
||||
if c.ECHServerKeys != "" {
|
||||
EchPrivateKey, err := base64.StdEncoding.DecodeString(c.ECHServerKeys)
|
||||
if err != nil {
|
||||
return nil, errors.New("invalid ECH Config", c.ECHServerKeys)
|
||||
}
|
||||
config.EchServerKeys = EchPrivateKey
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
||||
@@ -613,6 +625,9 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
||||
config.MaxTimeDiff = c.MaxTimeDiff
|
||||
|
||||
if c.Mldsa65Seed != "" {
|
||||
if c.Mldsa65Seed == c.PrivateKey {
|
||||
return nil, errors.New(`"mldsa65Seed" and "privateKey" can not be the same value: `, c.Mldsa65Seed)
|
||||
}
|
||||
if config.Mldsa65Seed, err = base64.RawURLEncoding.DecodeString(c.Mldsa65Seed); err != nil || len(config.Mldsa65Seed) != 32 {
|
||||
return nil, errors.New(`invalid "mldsa65Seed": `, c.Mldsa65Seed)
|
||||
}
|
||||
|
@@ -23,6 +23,8 @@ var CmdAPI = &base.Command{
|
||||
cmdRemoveOutbounds,
|
||||
cmdListInbounds,
|
||||
cmdListOutbounds,
|
||||
cmdAddInboundUsers,
|
||||
cmdRemoveInboundUsers,
|
||||
cmdInboundUser,
|
||||
cmdInboundUserCount,
|
||||
cmdAddRules,
|
||||
|
144
xray-core/main/commands/all/api/inbound_user_add.go
Normal file
144
xray-core/main/commands/all/api/inbound_user_add.go
Normal file
@@ -0,0 +1,144 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/xtls/xray-core/common/protocol"
|
||||
|
||||
handlerService "github.com/xtls/xray-core/app/proxyman/command"
|
||||
cserial "github.com/xtls/xray-core/common/serial"
|
||||
|
||||
"github.com/xtls/xray-core/core"
|
||||
"github.com/xtls/xray-core/infra/conf"
|
||||
"github.com/xtls/xray-core/infra/conf/serial"
|
||||
"github.com/xtls/xray-core/proxy/shadowsocks"
|
||||
"github.com/xtls/xray-core/proxy/shadowsocks_2022"
|
||||
"github.com/xtls/xray-core/proxy/trojan"
|
||||
vlessin "github.com/xtls/xray-core/proxy/vless/inbound"
|
||||
vmessin "github.com/xtls/xray-core/proxy/vmess/inbound"
|
||||
|
||||
"github.com/xtls/xray-core/main/commands/base"
|
||||
)
|
||||
|
||||
var cmdAddInboundUsers = &base.Command{
|
||||
CustomFlags: true,
|
||||
UsageLine: "{{.Exec}} api adu [--server=127.0.0.1:8080] <c1.json> [c2.json]...",
|
||||
Short: "Add users to inbounds",
|
||||
Long: `
|
||||
Add users to inbounds.
|
||||
Arguments:
|
||||
-s, -server
|
||||
The API server address. Default 127.0.0.1:8080
|
||||
-t, -timeout
|
||||
Timeout seconds to call API. Default 3
|
||||
Example:
|
||||
{{.Exec}} {{.LongName}} --server=127.0.0.1:8080 c1.json c2.json
|
||||
`,
|
||||
Run: executeAddInboundUsers,
|
||||
}
|
||||
|
||||
func executeAddInboundUsers(cmd *base.Command, args []string) {
|
||||
setSharedFlags(cmd)
|
||||
cmd.Flag.Parse(args)
|
||||
unnamedArgs := cmd.Flag.Args()
|
||||
inbs := extractInboundsConfig(unnamedArgs)
|
||||
|
||||
conn, ctx, close := dialAPIServer()
|
||||
defer close()
|
||||
client := handlerService.NewHandlerServiceClient(conn)
|
||||
|
||||
success := 0
|
||||
for _, inb := range inbs {
|
||||
success += executeInboundUserAction(ctx, client, inb, addInboundUserAction)
|
||||
}
|
||||
fmt.Println("Added", success, "user(s) in total.")
|
||||
}
|
||||
|
||||
func addInboundUserAction(ctx context.Context, client handlerService.HandlerServiceClient, tag string, user *protocol.User) error {
|
||||
fmt.Println("add user:", user.Email)
|
||||
_, err := client.AlterInbound(ctx, &handlerService.AlterInboundRequest{
|
||||
Tag: tag,
|
||||
Operation: cserial.ToTypedMessage(
|
||||
&handlerService.AddUserOperation{
|
||||
User: user,
|
||||
}),
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
func extractInboundUsers(inb *core.InboundHandlerConfig) []*protocol.User {
|
||||
if inb == nil {
|
||||
return nil
|
||||
}
|
||||
inst, err := inb.ProxySettings.GetInstance()
|
||||
if err != nil || inst == nil {
|
||||
fmt.Println("failed to get inbound instance:", err)
|
||||
return nil
|
||||
}
|
||||
switch ty := inst.(type) {
|
||||
case *vmessin.Config:
|
||||
return ty.User
|
||||
case *vlessin.Config:
|
||||
return ty.Clients
|
||||
case *trojan.ServerConfig:
|
||||
return ty.Users
|
||||
case *shadowsocks.ServerConfig:
|
||||
return ty.Users
|
||||
case *shadowsocks_2022.MultiUserServerConfig:
|
||||
return ty.Users
|
||||
default:
|
||||
fmt.Println("unsupported inbound type")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func extractInboundsConfig(unnamedArgs []string) []conf.InboundDetourConfig {
|
||||
ins := make([]conf.InboundDetourConfig, 0)
|
||||
for _, arg := range unnamedArgs {
|
||||
r, err := loadArg(arg)
|
||||
if err != nil {
|
||||
base.Fatalf("failed to load %s: %s", arg, err)
|
||||
}
|
||||
conf, err := serial.DecodeJSONConfig(r)
|
||||
if err != nil {
|
||||
base.Fatalf("failed to decode %s: %s", arg, err)
|
||||
}
|
||||
ins = append(ins, conf.InboundConfigs...)
|
||||
}
|
||||
return ins
|
||||
}
|
||||
|
||||
func executeInboundUserAction(ctx context.Context, client handlerService.HandlerServiceClient, inb conf.InboundDetourConfig, action func(ctx context.Context, client handlerService.HandlerServiceClient, tag string, user *protocol.User) error) int {
|
||||
success := 0
|
||||
|
||||
tag := inb.Tag
|
||||
if len(tag) < 1 {
|
||||
return success
|
||||
}
|
||||
|
||||
fmt.Println("processing inbound:", tag)
|
||||
built, err := inb.Build()
|
||||
if err != nil {
|
||||
fmt.Println("failed to build config:", err)
|
||||
return success
|
||||
}
|
||||
|
||||
users := extractInboundUsers(built)
|
||||
if users == nil {
|
||||
return success
|
||||
}
|
||||
|
||||
for _, user := range users {
|
||||
if len(user.Email) < 1 {
|
||||
continue
|
||||
}
|
||||
if err := action(ctx, client, inb.Tag, user); err == nil {
|
||||
fmt.Println("result: ok")
|
||||
success += 1
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
return success
|
||||
}
|
62
xray-core/main/commands/all/api/inbound_user_remove.go
Normal file
62
xray-core/main/commands/all/api/inbound_user_remove.go
Normal file
@@ -0,0 +1,62 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
handlerService "github.com/xtls/xray-core/app/proxyman/command"
|
||||
cserial "github.com/xtls/xray-core/common/serial"
|
||||
|
||||
"github.com/xtls/xray-core/main/commands/base"
|
||||
)
|
||||
|
||||
var cmdRemoveInboundUsers = &base.Command{
|
||||
CustomFlags: true,
|
||||
UsageLine: "{{.Exec}} api rmu [--server=127.0.0.1:8080] -tag=tag <email1> [email2]...",
|
||||
Short: "Remove users from inbounds",
|
||||
Long: `
|
||||
Remove users from inbounds.
|
||||
Arguments:
|
||||
-s, -server
|
||||
The API server address. Default 127.0.0.1:8080
|
||||
-t, -timeout
|
||||
Timeout seconds to call API. Default 3
|
||||
-tag
|
||||
Inbound tag
|
||||
Example:
|
||||
{{.Exec}} {{.LongName}} --server=127.0.0.1:8080 -tag="vless-in" "xray@love.com" ...
|
||||
`,
|
||||
Run: executeRemoveUsers,
|
||||
}
|
||||
|
||||
func executeRemoveUsers(cmd *base.Command, args []string) {
|
||||
setSharedFlags(cmd)
|
||||
var tag string
|
||||
cmd.Flag.StringVar(&tag, "tag", "", "")
|
||||
cmd.Flag.Parse(args)
|
||||
emails := cmd.Flag.Args()
|
||||
if len(tag) < 1 {
|
||||
base.Fatalf("inbound tag not specified")
|
||||
}
|
||||
|
||||
conn, ctx, close := dialAPIServer()
|
||||
defer close()
|
||||
client := handlerService.NewHandlerServiceClient(conn)
|
||||
|
||||
success := 0
|
||||
for _, email := range emails {
|
||||
fmt.Println("remove user:", email)
|
||||
_, err := client.AlterInbound(ctx, &handlerService.AlterInboundRequest{
|
||||
Tag: tag,
|
||||
Operation: cserial.ToTypedMessage(
|
||||
&handlerService.RemoveUserOperation{
|
||||
Email: email,
|
||||
}),
|
||||
})
|
||||
if err == nil {
|
||||
success += 1
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
fmt.Println("Removed", success, "user(s) in total.")
|
||||
}
|
@@ -1,25 +1,26 @@
|
||||
package tls
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/base64"
|
||||
"encoding/pem"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/OmarTariq612/goech"
|
||||
"github.com/cloudflare/circl/hpke"
|
||||
"github.com/xtls/reality/hpke"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/main/commands/base"
|
||||
"github.com/xtls/xray-core/transport/internet/tls"
|
||||
"golang.org/x/crypto/cryptobyte"
|
||||
)
|
||||
|
||||
var cmdECH = &base.Command{
|
||||
UsageLine: `{{.Exec}} tls ech [--serverName (string)] [--json]`,
|
||||
UsageLine: `{{.Exec}} tls ech [--serverName (string)] [--pem] [-i "ECHServerKeys (base64.StdEncoding)"]`,
|
||||
Short: `Generate TLS-ECH certificates`,
|
||||
Long: `
|
||||
Generate TLS-ECH certificates.
|
||||
|
||||
Set serverName to your custom string: {{.Exec}} tls ech --serverName (string)
|
||||
Generate into json format: {{.Exec}} tls ech --json
|
||||
Generate into pem format: {{.Exec}} tls ech --pem
|
||||
Restore ECHConfigs from ECHServerKeys: {{.Exec}} tls ech -i "ECHServerKeys (base64.StdEncoding)"
|
||||
`, // Enable PQ signature schemes: {{.Exec}} tls ech --pq-signature-schemes-enabled
|
||||
}
|
||||
|
||||
@@ -27,43 +28,66 @@ func init() {
|
||||
cmdECH.Run = executeECH
|
||||
}
|
||||
|
||||
var input_pqSignatureSchemesEnabled = cmdECH.Flag.Bool("pqSignatureSchemesEnabled", false, "")
|
||||
var input_echServerKeys = cmdECH.Flag.String("i", "", "ECHServerKeys (base64.StdEncoding)")
|
||||
|
||||
// var input_pqSignatureSchemesEnabled = cmdECH.Flag.Bool("pqSignatureSchemesEnabled", false, "")
|
||||
var input_serverName = cmdECH.Flag.String("serverName", "cloudflare-ech.com", "")
|
||||
var input_json = cmdECH.Flag.Bool("json", false, "True == turn on json output")
|
||||
var input_pem = cmdECH.Flag.Bool("pem", false, "True == turn on pem output")
|
||||
|
||||
func executeECH(cmd *base.Command, args []string) {
|
||||
var kem hpke.KEM
|
||||
var kem uint16
|
||||
|
||||
if *input_pqSignatureSchemesEnabled {
|
||||
kem = hpke.KEM_X25519_KYBER768_DRAFT00
|
||||
} else {
|
||||
kem = hpke.KEM_X25519_HKDF_SHA256
|
||||
}
|
||||
// if *input_pqSignatureSchemesEnabled {
|
||||
// kem = 0x30 // hpke.KEM_X25519_KYBER768_DRAFT00
|
||||
// } else {
|
||||
kem = hpke.DHKEM_X25519_HKDF_SHA256
|
||||
// }
|
||||
|
||||
echKeySet, err := goech.GenerateECHKeySet(0, *input_serverName, kem)
|
||||
echConfig, priv, err := tls.GenerateECHKeySet(0, *input_serverName, kem)
|
||||
common.Must(err)
|
||||
|
||||
configBuffer, _ := echKeySet.ECHConfig.MarshalBinary()
|
||||
keyBuffer, _ := echKeySet.MarshalBinary()
|
||||
var configBuffer, keyBuffer []byte
|
||||
if *input_echServerKeys == "" {
|
||||
configBytes, _ := tls.MarshalBinary(echConfig)
|
||||
var b cryptobyte.Builder
|
||||
b.AddUint16LengthPrefixed(func(child *cryptobyte.Builder) {
|
||||
child.AddBytes(configBytes)
|
||||
})
|
||||
configBuffer, _ = b.Bytes()
|
||||
var b2 cryptobyte.Builder
|
||||
b2.AddUint16(uint16(len(priv)))
|
||||
b2.AddBytes(priv)
|
||||
b2.AddUint16(uint16(len(configBytes)))
|
||||
b2.AddBytes(configBytes)
|
||||
keyBuffer, _ = b2.Bytes()
|
||||
} else {
|
||||
keySetsByte, err := base64.StdEncoding.DecodeString(*input_echServerKeys)
|
||||
if err != nil {
|
||||
os.Stdout.WriteString("Failed to decode ECHServerKeys: " + err.Error() + "\n")
|
||||
return
|
||||
}
|
||||
keyBuffer = keySetsByte
|
||||
KeySets, err := tls.ConvertToGoECHKeys(keySetsByte)
|
||||
if err != nil {
|
||||
os.Stdout.WriteString("Failed to decode ECHServerKeys: " + err.Error() + "\n")
|
||||
return
|
||||
}
|
||||
var b cryptobyte.Builder
|
||||
for _, keySet := range KeySets {
|
||||
b.AddUint16LengthPrefixed(func(child *cryptobyte.Builder) {
|
||||
child.AddBytes(keySet.Config)
|
||||
})
|
||||
}
|
||||
configBuffer, _ = b.Bytes()
|
||||
}
|
||||
|
||||
if *input_pem {
|
||||
configPEM := string(pem.EncodeToMemory(&pem.Block{Type: "ECH CONFIGS", Bytes: configBuffer}))
|
||||
keyPEM := string(pem.EncodeToMemory(&pem.Block{Type: "ECH KEYS", Bytes: keyBuffer}))
|
||||
if *input_json {
|
||||
jECHConfigs := map[string]interface{}{
|
||||
"configs": strings.Split(strings.TrimSpace(string(configPEM)), "\n"),
|
||||
}
|
||||
jECHKey := map[string]interface{}{
|
||||
"key": strings.Split(strings.TrimSpace(string(keyPEM)), "\n"),
|
||||
}
|
||||
|
||||
for _, i := range []map[string]interface{}{jECHConfigs, jECHKey} {
|
||||
content, err := json.MarshalIndent(i, "", " ")
|
||||
common.Must(err)
|
||||
os.Stdout.Write(content)
|
||||
os.Stdout.WriteString("\n")
|
||||
}
|
||||
} else {
|
||||
os.Stdout.WriteString(configPEM)
|
||||
os.Stdout.WriteString(keyPEM)
|
||||
} else {
|
||||
os.Stdout.WriteString("ECH config list: \n" + base64.StdEncoding.EncodeToString(configBuffer) + "\n")
|
||||
os.Stdout.WriteString("ECH server keys: \n" + base64.StdEncoding.EncodeToString(keyBuffer) + "\n")
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user