mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
Update On Fri Dec 20 19:32:57 CET 2024
This commit is contained in:
@@ -857,3 +857,4 @@ Update On Mon Dec 16 19:36:05 CET 2024
|
||||
Update On Tue Dec 17 19:39:30 CET 2024
|
||||
Update On Wed Dec 18 19:36:24 CET 2024
|
||||
Update On Thu Dec 19 19:34:25 CET 2024
|
||||
Update On Fri Dec 20 19:32:48 CET 2024
|
||||
|
||||
Generated
+13
-7
@@ -1587,7 +1587,7 @@ dependencies = [
|
||||
"url",
|
||||
"uuid",
|
||||
"webview2-com",
|
||||
"which 7.0.0",
|
||||
"which 7.0.1",
|
||||
"whoami",
|
||||
"window-vibrancy",
|
||||
"windows-core 0.58.0",
|
||||
@@ -1666,7 +1666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2691,6 +2691,12 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_home"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.5"
|
||||
@@ -4696,7 +4702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -10384,12 +10390,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "7.0.0"
|
||||
version = "7.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b"
|
||||
checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028"
|
||||
dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"env_home",
|
||||
"rustix",
|
||||
"winsafe",
|
||||
]
|
||||
@@ -10439,7 +10445,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -79,12 +79,12 @@
|
||||
"monaco-yaml": "5.2.3",
|
||||
"nanoid": "5.0.9",
|
||||
"sass-embedded": "1.83.0",
|
||||
"shiki": "1.24.2",
|
||||
"shiki": "1.24.3",
|
||||
"tailwindcss-textshadow": "2.1.3",
|
||||
"unplugin-auto-import": "0.19.0",
|
||||
"unplugin-icons": "0.22.0",
|
||||
"validator": "13.12.0",
|
||||
"vite": "6.0.3",
|
||||
"vite": "6.0.5",
|
||||
"vite-plugin-sass-dts": "1.3.29",
|
||||
"vite-plugin-svgr": "4.3.0",
|
||||
"vite-tsconfig-paths": "5.1.4",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"react-error-boundary": "4.1.2",
|
||||
"react-i18next": "15.2.0",
|
||||
"react-use": "17.6.0",
|
||||
"vite": "6.0.3",
|
||||
"vite": "6.0.5",
|
||||
"vite-tsconfig-paths": "5.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 1,
|
||||
"latest": {
|
||||
"mihomo": "v1.19.0",
|
||||
"mihomo_alpha": "alpha-3f6823b",
|
||||
"mihomo_alpha": "alpha-89dfabe",
|
||||
"clash_rs": "v0.7.3",
|
||||
"clash_premium": "2023-09-05-gdcc8d87",
|
||||
"clash_rs_alpha": "0.7.3-alpha+sha.7c07bed"
|
||||
@@ -69,5 +69,5 @@
|
||||
"linux-armv7hf": "clash-armv7-unknown-linux-gnueabihf"
|
||||
}
|
||||
},
|
||||
"updated_at": "2024-12-16T22:20:47.148Z"
|
||||
"updated_at": "2024-12-19T22:20:43.617Z"
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
"eslint-import-resolver-alias": "1.1.2",
|
||||
"eslint-plugin-html": "8.1.2",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-n": "17.15.0",
|
||||
"eslint-plugin-n": "17.15.1",
|
||||
"eslint-plugin-prettier": "5.2.1",
|
||||
"eslint-plugin-promise": "7.2.1",
|
||||
"eslint-plugin-react": "7.37.2",
|
||||
@@ -108,7 +108,7 @@
|
||||
"typescript": "5.7.2",
|
||||
"typescript-eslint": "8.18.1"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c",
|
||||
"packageManager": "pnpm@9.15.1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf",
|
||||
"engines": {
|
||||
"node": "22.12.0"
|
||||
},
|
||||
|
||||
Generated
+94
-100
@@ -68,7 +68,7 @@ importers:
|
||||
version: 9.1.0(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-config-standard:
|
||||
specifier: 17.1.0
|
||||
version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.0(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))
|
||||
version: 17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-import-resolver-alias:
|
||||
specifier: 1.1.2
|
||||
version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))
|
||||
@@ -79,8 +79,8 @@ importers:
|
||||
specifier: 2.31.0
|
||||
version: 2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-n:
|
||||
specifier: 17.15.0
|
||||
version: 17.15.0(eslint@9.17.0(jiti@2.4.1))
|
||||
specifier: 17.15.1
|
||||
version: 17.15.1(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-prettier:
|
||||
specifier: 5.2.1
|
||||
version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2)
|
||||
@@ -328,7 +328,7 @@ importers:
|
||||
version: 1.89.2(@tanstack/react-router@1.89.2(@tanstack/router-generator@1.87.7)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(csstype@3.1.3)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
'@tanstack/router-plugin':
|
||||
specifier: 1.87.13
|
||||
version: 1.87.13(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 1.87.13(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@tauri-apps/plugin-clipboard-manager':
|
||||
specifier: 2.2.0
|
||||
version: 2.2.0
|
||||
@@ -364,13 +364,13 @@ importers:
|
||||
version: 13.12.2
|
||||
'@vitejs/plugin-legacy':
|
||||
specifier: 6.0.0
|
||||
version: 6.0.0(terser@5.36.0)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 6.0.0(terser@5.36.0)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@vitejs/plugin-react':
|
||||
specifier: 4.3.4
|
||||
version: 4.3.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.4(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
'@vitejs/plugin-react-swc':
|
||||
specifier: 3.7.2
|
||||
version: 3.7.2(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 3.7.2(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
change-case:
|
||||
specifier: 5.4.4
|
||||
version: 5.4.4
|
||||
@@ -396,8 +396,8 @@ importers:
|
||||
specifier: 1.83.0
|
||||
version: 1.83.0
|
||||
shiki:
|
||||
specifier: 1.24.2
|
||||
version: 1.24.2
|
||||
specifier: 1.24.3
|
||||
version: 1.24.3
|
||||
tailwindcss-textshadow:
|
||||
specifier: 2.1.3
|
||||
version: 2.1.3
|
||||
@@ -411,17 +411,17 @@ importers:
|
||||
specifier: 13.12.0
|
||||
version: 13.12.0
|
||||
vite:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
specifier: 6.0.5
|
||||
version: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite-plugin-sass-dts:
|
||||
specifier: 1.3.29
|
||||
version: 1.3.29(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 1.3.29(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
vite-plugin-svgr:
|
||||
specifier: 4.3.0
|
||||
version: 4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
vite-tsconfig-paths:
|
||||
specifier: 5.1.4
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
zod:
|
||||
specifier: 3.24.1
|
||||
version: 3.24.1
|
||||
@@ -457,7 +457,7 @@ importers:
|
||||
version: 19.0.2
|
||||
'@vitejs/plugin-react':
|
||||
specifier: 4.3.4
|
||||
version: 4.3.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.3.4(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
ahooks:
|
||||
specifier: 3.8.4
|
||||
version: 3.8.4(react@19.0.0)
|
||||
@@ -483,11 +483,11 @@ importers:
|
||||
specifier: 17.6.0
|
||||
version: 17.6.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
vite:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
specifier: 6.0.5
|
||||
version: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite-tsconfig-paths:
|
||||
specifier: 5.1.4
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 5.1.4(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
devDependencies:
|
||||
'@emotion/react':
|
||||
specifier: 11.14.0
|
||||
@@ -512,7 +512,7 @@ importers:
|
||||
version: 5.1.0(typescript@5.7.2)
|
||||
vite-plugin-dts:
|
||||
specifier: 4.4.0
|
||||
version: 4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
version: 4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))
|
||||
|
||||
scripts:
|
||||
dependencies:
|
||||
@@ -545,8 +545,8 @@ importers:
|
||||
specifier: 1.0.0
|
||||
version: 1.0.0
|
||||
consola:
|
||||
specifier: 3.2.3
|
||||
version: 3.2.3
|
||||
specifier: 3.3.0
|
||||
version: 3.3.0
|
||||
fs-extra:
|
||||
specifier: 11.2.0
|
||||
version: 11.2.0
|
||||
@@ -1652,10 +1652,6 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
|
||||
'@eslint-community/regexpp@4.11.0':
|
||||
resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
|
||||
'@eslint-community/regexpp@4.12.1':
|
||||
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
@@ -2521,20 +2517,20 @@ packages:
|
||||
'@rushstack/ts-command-line@4.23.2':
|
||||
resolution: {integrity: sha512-JJ7XZX5K3ThBBva38aomgsPv1L7FV6XmSOcR6HtM7HDFZJkepqT65imw26h9ggGqMjsY0R9jcl30tzKcVj9aOQ==}
|
||||
|
||||
'@shikijs/core@1.24.2':
|
||||
resolution: {integrity: sha512-BpbNUSKIwbKrRRA+BQj0BEWSw+8kOPKDJevWeSE/xIqGX7K0xrCZQ9kK0nnEQyrzsUoka1l81ZtJ2mGaCA32HQ==}
|
||||
'@shikijs/core@1.24.3':
|
||||
resolution: {integrity: sha512-VRcf4GYUIkxIchGM9DrapRcxtgojg4IWKUtX5EtW+4PJiGzF2xQqZSv27PJt+WLc18KT3CNLpNWow9JYV5n+Rg==}
|
||||
|
||||
'@shikijs/engine-javascript@1.24.2':
|
||||
resolution: {integrity: sha512-EqsmYBJdLEwEiO4H+oExz34a5GhhnVp+jH9Q/XjPjmBPc6TE/x4/gD0X3i0EbkKKNqXYHHJTJUpOLRQNkEzS9Q==}
|
||||
'@shikijs/engine-javascript@1.24.3':
|
||||
resolution: {integrity: sha512-De8tNLvYjeK6V0Gb47jIH2M+OKkw+lWnSV1j3HVDFMlNIglmVcTMG2fASc29W0zuFbfEEwKjO8Fe4KYSO6Ce3w==}
|
||||
|
||||
'@shikijs/engine-oniguruma@1.24.2':
|
||||
resolution: {integrity: sha512-ZN6k//aDNWRJs1uKB12pturKHh7GejKugowOFGAuG7TxDRLod1Bd5JhpOikOiFqPmKjKEPtEA6mRCf7q3ulDyQ==}
|
||||
'@shikijs/engine-oniguruma@1.24.3':
|
||||
resolution: {integrity: sha512-iNnx950gs/5Nk+zrp1LuF+S+L7SKEhn8k9eXgFYPGhVshKppsYwRmW8tpmAMvILIMSDfrgqZ0w+3xWVQB//1Xw==}
|
||||
|
||||
'@shikijs/types@1.24.2':
|
||||
resolution: {integrity: sha512-bdeWZiDtajGLG9BudI0AHet0b6e7FbR0EsE4jpGaI0YwHm/XJunI9+3uZnzFtX65gsyJ6ngCIWUfA4NWRPnBkQ==}
|
||||
'@shikijs/types@1.24.3':
|
||||
resolution: {integrity: sha512-FPMrJ69MNxhRtldRk69CghvaGlbbN3pKRuvko0zvbfa2dXp4pAngByToqS5OY5jvN8D7LKR4RJE8UvzlCOuViw==}
|
||||
|
||||
'@shikijs/vscode-textmate@9.3.0':
|
||||
resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==}
|
||||
'@shikijs/vscode-textmate@9.3.1':
|
||||
resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==}
|
||||
|
||||
'@sindresorhus/is@4.6.0':
|
||||
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
|
||||
@@ -3718,8 +3714,8 @@ packages:
|
||||
resolution: {integrity: sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
consola@3.2.3:
|
||||
resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==}
|
||||
consola@3.3.0:
|
||||
resolution: {integrity: sha512-kxltocVQCwQNFvw40dlVRYeAkAvtYjMFZYNlOcsF5wExPpGwPxMwgx4IfDJvBRPtBpnQwItd5WkTaR0ZwT/TmQ==}
|
||||
engines: {node: ^14.18.0 || >=16.10.0}
|
||||
|
||||
conventional-changelog-angular@7.0.0:
|
||||
@@ -4398,8 +4394,8 @@ packages:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
|
||||
eslint-plugin-n@17.15.0:
|
||||
resolution: {integrity: sha512-xF3zJkOfLlFOm5TvmqmsnA9/fO+/z2pYs0dkuKXKN/ymS6UB1yEcaoIkqxLKQ9Dw/WmLX/Tdh6/5ZS5azVixFQ==}
|
||||
eslint-plugin-n@17.15.1:
|
||||
resolution: {integrity: sha512-KFw7x02hZZkBdbZEFQduRGH4VkIH4MW97ClsbAM4Y4E6KguBJWGfWG1P4HEIpZk2bkoWf0bojpnjNAhYQP8beA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: '>=8.23.0'
|
||||
@@ -4827,8 +4823,8 @@ packages:
|
||||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
hast-util-to-html@9.0.3:
|
||||
resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==}
|
||||
hast-util-to-html@9.0.4:
|
||||
resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==}
|
||||
|
||||
hast-util-to-jsx-runtime@2.3.0:
|
||||
resolution: {integrity: sha512-H/y0+IWPdsLLS738P8tDnrQ8Z+dj12zQQ6WC11TIM21C8WFVoIxcqWXf2H3hiTVZjF1AWqoimGwrTWecWrnmRQ==}
|
||||
@@ -5944,8 +5940,8 @@ packages:
|
||||
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
oniguruma-to-es@0.7.0:
|
||||
resolution: {integrity: sha512-HRaRh09cE0gRS3+wi2zxekB+I5L8C/gN60S+vb11eADHUaB/q4u8wGGOX3GvwvitG8ixaeycZfeoyruKQzUgNg==}
|
||||
oniguruma-to-es@0.8.0:
|
||||
resolution: {integrity: sha512-rY+/a6b+uCgoYIL9itjY0x99UUDHXmGaw7Jjk5ZvM/3cxDJifyxFr/Zm4tTmF6Tre18gAakJo7AzhKUeMNLgHA==}
|
||||
|
||||
open@8.4.2:
|
||||
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
|
||||
@@ -6535,8 +6531,8 @@ packages:
|
||||
regenerator-transform@0.15.2:
|
||||
resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==}
|
||||
|
||||
regex-recursion@4.3.0:
|
||||
resolution: {integrity: sha512-5LcLnizwjcQ2ALfOj95MjcatxyqF5RPySx9yT+PaXu3Gox2vyAtLDjHB8NTJLtMGkvyau6nI3CfpwFCjPUIs/A==}
|
||||
regex-recursion@5.0.0:
|
||||
resolution: {integrity: sha512-UwyOqeobrCCqTXPcsSqH4gDhOjD5cI/b8kjngWgSZbxYh5yVjAwTjO5+hAuPRNiuR70+5RlWSs+U9PVcVcW9Lw==}
|
||||
|
||||
regex-utilities@2.3.0:
|
||||
resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==}
|
||||
@@ -6885,8 +6881,8 @@ packages:
|
||||
shell-quote@1.8.1:
|
||||
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
|
||||
|
||||
shiki@1.24.2:
|
||||
resolution: {integrity: sha512-TR1fi6mkRrzW+SKT5G6uKuc32Dj2EEa7Kj0k8kGqiBINb+C1TiflVOiT9ta6GqOJtC4fraxO5SLUaKBcSY38Fg==}
|
||||
shiki@1.24.3:
|
||||
resolution: {integrity: sha512-eMeX/ehE2IDKVs71kB4zVcDHjutNcOtm+yIRuR4sA6ThBbdFI0DffGJiyoKCodj0xRGxIoWC3pk/Anmm5mzHmA==}
|
||||
|
||||
side-channel@1.0.6:
|
||||
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
|
||||
@@ -7636,8 +7632,8 @@ packages:
|
||||
vite:
|
||||
optional: true
|
||||
|
||||
vite@6.0.3:
|
||||
resolution: {integrity: sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==}
|
||||
vite@6.0.5:
|
||||
resolution: {integrity: sha512-akD5IAH/ID5imgue2DYhzsEwCi0/4VKY31uhMLEYJwPP4TiUp8pL5PIK+Wo7H8qT8JY9i+pVfPydcFPYD1EL7g==}
|
||||
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -9065,8 +9061,6 @@ snapshots:
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@eslint-community/regexpp@4.11.0': {}
|
||||
|
||||
'@eslint-community/regexpp@4.12.1': {}
|
||||
|
||||
'@eslint/compat@1.2.4(eslint@9.17.0(jiti@2.4.1))':
|
||||
@@ -9917,32 +9911,32 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
'@shikijs/core@1.24.2':
|
||||
'@shikijs/core@1.24.3':
|
||||
dependencies:
|
||||
'@shikijs/engine-javascript': 1.24.2
|
||||
'@shikijs/engine-oniguruma': 1.24.2
|
||||
'@shikijs/types': 1.24.2
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@shikijs/engine-javascript': 1.24.3
|
||||
'@shikijs/engine-oniguruma': 1.24.3
|
||||
'@shikijs/types': 1.24.3
|
||||
'@shikijs/vscode-textmate': 9.3.1
|
||||
'@types/hast': 3.0.4
|
||||
hast-util-to-html: 9.0.3
|
||||
hast-util-to-html: 9.0.4
|
||||
|
||||
'@shikijs/engine-javascript@1.24.2':
|
||||
'@shikijs/engine-javascript@1.24.3':
|
||||
dependencies:
|
||||
'@shikijs/types': 1.24.2
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
oniguruma-to-es: 0.7.0
|
||||
'@shikijs/types': 1.24.3
|
||||
'@shikijs/vscode-textmate': 9.3.1
|
||||
oniguruma-to-es: 0.8.0
|
||||
|
||||
'@shikijs/engine-oniguruma@1.24.2':
|
||||
'@shikijs/engine-oniguruma@1.24.3':
|
||||
dependencies:
|
||||
'@shikijs/types': 1.24.2
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@shikijs/types': 1.24.3
|
||||
'@shikijs/vscode-textmate': 9.3.1
|
||||
|
||||
'@shikijs/types@1.24.2':
|
||||
'@shikijs/types@1.24.3':
|
||||
dependencies:
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@shikijs/vscode-textmate': 9.3.1
|
||||
'@types/hast': 3.0.4
|
||||
|
||||
'@shikijs/vscode-textmate@9.3.0': {}
|
||||
'@shikijs/vscode-textmate@9.3.1': {}
|
||||
|
||||
'@sindresorhus/is@4.6.0': {}
|
||||
|
||||
@@ -10144,7 +10138,7 @@ snapshots:
|
||||
tsx: 4.19.2
|
||||
zod: 3.24.1
|
||||
|
||||
'@tanstack/router-plugin@1.87.13(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@tanstack/router-plugin@1.87.13(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/generator': 7.26.3
|
||||
@@ -10165,7 +10159,7 @@ snapshots:
|
||||
unplugin: 1.16.0
|
||||
zod: 3.24.1
|
||||
optionalDependencies:
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -10618,7 +10612,7 @@ snapshots:
|
||||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
|
||||
'@vitejs/plugin-legacy@6.0.0(terser@5.36.0)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-legacy@6.0.0(terser@5.36.0)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/preset-env': 7.26.0(@babel/core@7.26.0)
|
||||
@@ -10629,25 +10623,25 @@ snapshots:
|
||||
regenerator-runtime: 0.14.1
|
||||
systemjs: 6.15.1
|
||||
terser: 5.36.0
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@vitejs/plugin-react-swc@3.7.2(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-react-swc@3.7.2(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@swc/core': 1.7.26
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- '@swc/helpers'
|
||||
|
||||
'@vitejs/plugin-react@4.3.4(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
'@vitejs/plugin-react@4.3.4(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1))':
|
||||
dependencies:
|
||||
'@babel/core': 7.26.0
|
||||
'@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0)
|
||||
'@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0)
|
||||
'@types/babel__core': 7.20.5
|
||||
react-refresh: 0.14.2
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -11242,7 +11236,7 @@ snapshots:
|
||||
write-file-atomic: 2.4.3
|
||||
xdg-basedir: 3.0.0
|
||||
|
||||
consola@3.2.3: {}
|
||||
consola@3.3.0: {}
|
||||
|
||||
conventional-changelog-angular@7.0.0:
|
||||
dependencies:
|
||||
@@ -11952,11 +11946,11 @@ snapshots:
|
||||
dependencies:
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
|
||||
eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.0(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)):
|
||||
eslint-config-standard@17.1.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-promise@7.2.1(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1)):
|
||||
dependencies:
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-n: 17.15.0(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-n: 17.15.1(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-promise: 7.2.1(eslint@9.17.0(jiti@2.4.1))
|
||||
|
||||
eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))):
|
||||
@@ -12001,7 +11995,7 @@ snapshots:
|
||||
eslint-plugin-es-x@7.8.0(eslint@9.17.0(jiti@2.4.1)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.1))
|
||||
'@eslint-community/regexpp': 4.11.0
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
eslint-compat-utils: 0.5.1(eslint@9.17.0(jiti@2.4.1))
|
||||
|
||||
@@ -12056,7 +12050,7 @@ snapshots:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-n@17.15.0(eslint@9.17.0(jiti@2.4.1)):
|
||||
eslint-plugin-n@17.15.1(eslint@9.17.0(jiti@2.4.1)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.1))
|
||||
enhanced-resolve: 5.17.1
|
||||
@@ -12581,7 +12575,7 @@ snapshots:
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
|
||||
hast-util-to-html@9.0.3:
|
||||
hast-util-to-html@9.0.4:
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
'@types/unist': 3.0.2
|
||||
@@ -13640,7 +13634,7 @@ snapshots:
|
||||
eslint: 9.17.0(jiti@2.4.1)
|
||||
eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import-x@4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.18.1(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-import-x: 4.5.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)
|
||||
eslint-plugin-n: 17.15.0(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-n: 17.15.1(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-promise: 7.2.1(eslint@9.17.0(jiti@2.4.1))
|
||||
eslint-plugin-react: 7.37.2(eslint@9.17.0(jiti@2.4.1))
|
||||
find-up: 5.0.0
|
||||
@@ -13798,11 +13792,11 @@ snapshots:
|
||||
dependencies:
|
||||
mimic-function: 5.0.1
|
||||
|
||||
oniguruma-to-es@0.7.0:
|
||||
oniguruma-to-es@0.8.0:
|
||||
dependencies:
|
||||
emoji-regex-xs: 1.0.0
|
||||
regex: 5.0.2
|
||||
regex-recursion: 4.3.0
|
||||
regex-recursion: 5.0.0
|
||||
|
||||
open@8.4.2:
|
||||
dependencies:
|
||||
@@ -14335,7 +14329,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.26.0
|
||||
|
||||
regex-recursion@4.3.0:
|
||||
regex-recursion@5.0.0:
|
||||
dependencies:
|
||||
regex-utilities: 2.3.0
|
||||
|
||||
@@ -14680,13 +14674,13 @@ snapshots:
|
||||
|
||||
shell-quote@1.8.1: {}
|
||||
|
||||
shiki@1.24.2:
|
||||
shiki@1.24.3:
|
||||
dependencies:
|
||||
'@shikijs/core': 1.24.2
|
||||
'@shikijs/engine-javascript': 1.24.2
|
||||
'@shikijs/engine-oniguruma': 1.24.2
|
||||
'@shikijs/types': 1.24.2
|
||||
'@shikijs/vscode-textmate': 9.3.0
|
||||
'@shikijs/core': 1.24.3
|
||||
'@shikijs/engine-javascript': 1.24.3
|
||||
'@shikijs/engine-oniguruma': 1.24.3
|
||||
'@shikijs/types': 1.24.3
|
||||
'@shikijs/vscode-textmate': 9.3.1
|
||||
'@types/hast': 3.0.4
|
||||
|
||||
side-channel@1.0.6:
|
||||
@@ -15543,7 +15537,7 @@ snapshots:
|
||||
- rollup
|
||||
- supports-color
|
||||
|
||||
vite-plugin-dts@4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-dts@4.4.0(@types/node@22.10.2)(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.48.1(@types/node@22.10.2)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.27.4)
|
||||
@@ -15556,43 +15550,43 @@ snapshots:
|
||||
magic-string: 0.30.17
|
||||
typescript: 5.7.2
|
||||
optionalDependencies:
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- rollup
|
||||
- supports-color
|
||||
|
||||
vite-plugin-sass-dts@1.3.29(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-sass-dts@1.3.29(postcss@8.4.49)(prettier@3.4.2)(sass-embedded@1.83.0)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
postcss: 8.4.49
|
||||
postcss-js: 4.0.1(postcss@8.4.49)
|
||||
prettier: 3.4.2
|
||||
sass-embedded: 1.83.0
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
|
||||
vite-plugin-svgr@4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-plugin-svgr@4.3.0(rollup@4.27.4)(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.1.3(rollup@4.27.4)
|
||||
'@svgr/core': 8.1.0(typescript@5.7.2)
|
||||
'@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.7.2))
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)):
|
||||
dependencies:
|
||||
debug: 4.3.7
|
||||
globrex: 0.1.2
|
||||
tsconfck: 3.0.3(typescript@5.7.2)
|
||||
optionalDependencies:
|
||||
vite: 6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
vite: 6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
vite@6.0.3(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1):
|
||||
vite@6.0.5(@types/node@22.10.2)(jiti@2.4.1)(less@4.2.0)(sass-embedded@1.83.0)(sass@1.83.0)(stylus@0.62.0)(terser@5.36.0)(tsx@4.19.2)(yaml@2.6.1):
|
||||
dependencies:
|
||||
esbuild: 0.24.0
|
||||
postcss: 8.4.49
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"@types/adm-zip": "0.5.7",
|
||||
"adm-zip": "0.5.16",
|
||||
"colorize-template": "1.0.0",
|
||||
"consola": "3.2.3",
|
||||
"consola": "3.3.0",
|
||||
"fs-extra": "11.2.0",
|
||||
"https-proxy-agent": "7.0.6",
|
||||
"node-fetch": "3.3.2",
|
||||
|
||||
@@ -58,7 +58,7 @@ sudo make uninstall
|
||||
```bash
|
||||
docker run -d --name doh-server \
|
||||
-p 8053:8053 \
|
||||
-e UPSTREAM_DNS_SERVER="udp:8.8.8.8:53" \
|
||||
-e UPSTREAM_DNS_SERVER="udp:208.67.222.222:53,udp:208.67.220.220:53" \
|
||||
-e DOH_HTTP_PREFIX="/dns-query" \
|
||||
-e DOH_SERVER_LISTEN=":8053" \
|
||||
-e DOH_SERVER_TIMEOUT="10" \
|
||||
@@ -66,6 +66,7 @@ docker run -d --name doh-server \
|
||||
-e DOH_SERVER_VERBOSE="false" \
|
||||
satishweb/doh-server
|
||||
```
|
||||
Note: Multiple Upstream DNS server support was added in the container image on 2024-12-19.
|
||||
|
||||
Feeling adventurous? Try the latest build:
|
||||
|
||||
|
||||
@@ -45,11 +45,10 @@ func newGeoLite2ASNCSV(action lib.Action, data json.RawMessage) (lib.InputConver
|
||||
}
|
||||
}
|
||||
|
||||
if tmp.IPv4File == "" {
|
||||
// When both of IP files are not specified,
|
||||
// it means user wants to use the default ones
|
||||
if tmp.IPv4File == "" && tmp.IPv6File == "" {
|
||||
tmp.IPv4File = defaultASNIPv4File
|
||||
}
|
||||
|
||||
if tmp.IPv6File == "" {
|
||||
tmp.IPv6File = defaultASNIPv6File
|
||||
}
|
||||
|
||||
|
||||
@@ -51,11 +51,10 @@ func newGeoLite2CountryCSV(action lib.Action, data json.RawMessage) (lib.InputCo
|
||||
tmp.CountryCodeFile = defaultCCFile
|
||||
}
|
||||
|
||||
if tmp.IPv4File == "" {
|
||||
// When both of IP files are not specified,
|
||||
// it means user wants to use the default ones
|
||||
if tmp.IPv4File == "" && tmp.IPv6File == "" {
|
||||
tmp.IPv4File = defaultCountryIPv4File
|
||||
}
|
||||
|
||||
if tmp.IPv6File == "" {
|
||||
tmp.IPv6File = defaultCountryIPv6File
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ define Package/default-settings
|
||||
CATEGORY:=LuCI
|
||||
TITLE:=LuCI support for Default Settings
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+luci-base +luci +@LUCI_LANG_zh-cn +@LUCI_LANG_zh_Hans
|
||||
DEPENDS:=+luci-base +luci +@LUCI_LANG_zh-cn +@LUCI_LANG_zh_Hans +@LUCI_LANG_en
|
||||
endef
|
||||
|
||||
define Package/default-settings/description
|
||||
|
||||
@@ -197,6 +197,11 @@ ramips_setup_macs()
|
||||
lan_mac=$(macaddr_add "$label_mac" 1)
|
||||
wan_mac=$label_mac
|
||||
;;
|
||||
huasifei,mt7621dtu)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
lan_mac=$label_mac
|
||||
wan_mac=$(macaddr_add "$label_mac" 1)
|
||||
;;
|
||||
hiwifi,hc5962)
|
||||
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
|
||||
label_mac=$lan_mac
|
||||
|
||||
@@ -8,7 +8,7 @@ FEATURES:=ext4 audio usb usbgadget display gpio fpu pci pcie rootfs-part boot-pa
|
||||
SUBTARGETS:=armv8
|
||||
|
||||
KERNEL_PATCHVER:=6.6
|
||||
KERNEL_TESTING_PATCHVER:=6.1
|
||||
KERNEL_TESTING_PATCHVER:=6.12
|
||||
|
||||
define Target/Description
|
||||
Build firmware image for Rockchip SoC devices.
|
||||
|
||||
@@ -0,0 +1,778 @@
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
|
||||
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
|
||||
CONFIG_ARCH_DEFAULT_CRASH_DUMP=y
|
||||
CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_FORCE_MAX_ORDER=10
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=33
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PKEY_BITS=3
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_ARCH_SELECTS_KEXEC_FILE=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_WANTS_EXECMEM_LATE=y
|
||||
CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_ARCH_WANTS_THP_SWAP=y
|
||||
CONFIG_ARC_EMAC_CORE=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_EPAN=y
|
||||
CONFIG_ARM64_ERRATUM_1024718=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_1319367=y
|
||||
CONFIG_ARM64_ERRATUM_1463225=y
|
||||
CONFIG_ARM64_ERRATUM_1530923=y
|
||||
CONFIG_ARM64_ERRATUM_1742098=y
|
||||
CONFIG_ARM64_ERRATUM_2051678=y
|
||||
CONFIG_ARM64_ERRATUM_2054223=y
|
||||
CONFIG_ARM64_ERRATUM_2067961=y
|
||||
CONFIG_ARM64_ERRATUM_2077057=y
|
||||
CONFIG_ARM64_ERRATUM_2441007=y
|
||||
CONFIG_ARM64_ERRATUM_2441009=y
|
||||
CONFIG_ARM64_ERRATUM_2658417=y
|
||||
CONFIG_ARM64_ERRATUM_3117295=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_845719=y
|
||||
CONFIG_ARM64_ERRATUM_858921=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_RAS_EXTN=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
# CONFIG_ARM64_SW_TTBR0_PAN is not set
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_VA_BITS=48
|
||||
# CONFIG_ARM64_VA_BITS_39 is not set
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
# CONFIG_ARM64_VA_BITS_52 is not set
|
||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y
|
||||
CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
|
||||
# CONFIG_ARMV8_DEPRECATED is not set
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_MHU=y
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
# CONFIG_ARM_MHU_V3 is not set
|
||||
CONFIG_ARM_PSCI_CPUIDLE=y
|
||||
CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
CONFIG_ARM_RK3328_DMC_DEVFREQ=y
|
||||
# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set
|
||||
# CONFIG_ARM_SCMI_CPUFREQ is not set
|
||||
# CONFIG_ARM_SCMI_DEBUG_COUNTERS is not set
|
||||
CONFIG_ARM_SCMI_HAVE_SHMEM=y
|
||||
CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
|
||||
# CONFIG_ARM_SCMI_PERF_DOMAIN is not set
|
||||
CONFIG_ARM_SCMI_POWER_CONTROL=y
|
||||
CONFIG_ARM_SCMI_POWER_DOMAIN=y
|
||||
CONFIG_ARM_SCMI_PROTOCOL=y
|
||||
# CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
|
||||
CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
|
||||
CONFIG_ARM_SCMI_TRANSPORT_SMC=y
|
||||
# CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
|
||||
CONFIG_ARM_SCPI_CPUFREQ=y
|
||||
CONFIG_ARM_SCPI_POWER_DOMAIN=y
|
||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
|
||||
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
# CONFIG_ARM_SMMU_V3_SVA is not set
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_GPIO=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BLK_DEV_BSG=y
|
||||
CONFIG_BLK_DEV_BSGLIB=y
|
||||
CONFIG_BLK_DEV_BSG_COMMON=y
|
||||
# CONFIG_BLK_DEV_INITRD is not set
|
||||
CONFIG_BLK_DEV_INTEGRITY=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_PCIESSD_MTIP32XX=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CHARGER_GPIO=y
|
||||
# CONFIG_CHARGER_RK817 is not set
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLK_PX30=y
|
||||
CONFIG_CLK_RK3308=y
|
||||
CONFIG_CLK_RK3328=y
|
||||
CONFIG_CLK_RK3368=y
|
||||
CONFIG_CLK_RK3399=y
|
||||
CONFIG_CLK_RK3528=y
|
||||
CONFIG_CLK_RK3568=y
|
||||
CONFIG_CLK_RK3576=y
|
||||
CONFIG_CLK_RK3588=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=64
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_RK808=y
|
||||
CONFIG_COMMON_CLK_ROCKCHIP=y
|
||||
CONFIG_COMMON_CLK_SCMI=y
|
||||
CONFIG_COMMON_CLK_SCPI=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set
|
||||
CONFIG_COMPAT_BINFMT_ELF=y
|
||||
CONFIG_COMPAT_OLD_SIGACTION=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPUSETS_V1 is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
|
||||
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
|
||||
CONFIG_CPU_ISOLATION=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRASH_RESERVE=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC64=y
|
||||
CONFIG_CRC64_ROCKSOFT=y
|
||||
CONFIG_CRC_T10DIF=y
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRC64_ROCKSOFT=y
|
||||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_SM4=y
|
||||
CONFIG_CRYPTO_SM4_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_SM4_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_SM4_ARM64_CE_GCM=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEVFREQ_EVENT_ROCKCHIP_DFI=y
|
||||
# CONFIG_DEVFREQ_GOV_PASSIVE is not set
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
# CONFIG_DEVFREQ_THERMAL is not set
|
||||
CONFIG_DEVMEM=y
|
||||
# CONFIG_DEVPORT is not set
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_DIMLIB=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_NEED_SYNC=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS_HELPERS=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DT_IDLE_GENPD=y
|
||||
CONFIG_DT_IDLE_STATES=y
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
CONFIG_DWMAC_DWC_QOS_ETH=y
|
||||
CONFIG_DWMAC_GENERIC=y
|
||||
CONFIG_DWMAC_ROCKCHIP=y
|
||||
CONFIG_DW_WATCHDOG=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_EMAC_ROCKCHIP=y
|
||||
CONFIG_ENERGY_MODEL=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_EXECMEM=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FS_STACK=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=4
|
||||
CONFIG_FUNCTION_ALIGNMENT_4B=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
|
||||
CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_DEVICES=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IOREMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_ROCKCHIP=y
|
||||
# CONFIG_GPIO_VIRTUSER is not set
|
||||
# CONFIG_HARDENED_USERCOPY is not set
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HID=y
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC=y
|
||||
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
# CONFIG_HOTPLUG_PCI_CPCI is not set
|
||||
# CONFIG_HOTPLUG_PCI_PCIE is not set
|
||||
# CONFIG_HOTPLUG_PCI_SHPC is not set
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_HUGETLB_PAGE=y
|
||||
CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ROCKCHIP=y
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_HZ_100 is not set
|
||||
CONFIG_HZ_250=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_RK3X=y
|
||||
# CONFIG_IDPF is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INDIRECT_PIO=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_FF_MEMLESS=y
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
CONFIG_INPUT_LEDS=y
|
||||
CONFIG_INPUT_MATRIXKMAP=y
|
||||
# CONFIG_INPUT_MISC is not set
|
||||
# CONFIG_IOMMUFD is not set
|
||||
CONFIG_IOMMU_API=y
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
|
||||
CONFIG_IOMMU_DMA=y
|
||||
CONFIG_IOMMU_IOVA=y
|
||||
CONFIG_IOMMU_IO_PGTABLE=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_DART is not set
|
||||
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
# CONFIG_IO_STRICT_DEVMEM is not set
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MSI_IOMMU=y
|
||||
CONFIG_IRQ_MSI_LIB=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_JFFS2_ZLIB=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KEXEC_CORE=y
|
||||
CONFIG_KEXEC_FILE=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_SYSCON=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=16
|
||||
CONFIG_LIBCRC32C=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LOG_BUF_SHIFT=19
|
||||
CONFIG_LRU_GEN_WALKS_MMU=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_SERIAL=y
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
CONFIG_MDIO_BUS_MUX_GPIO=y
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
# CONFIG_MEMCG_V1 is not set
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_KHADAS_MCU is not set
|
||||
CONFIG_MFD_RK8XX=y
|
||||
CONFIG_MFD_RK8XX_I2C=y
|
||||
CONFIG_MFD_RK8XX_SPI=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_CQHCI=y
|
||||
CONFIG_MMC_DW=y
|
||||
# CONFIG_MMC_DW_BLUEFIELD is not set
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
# CONFIG_MMC_DW_HI3798CV200 is not set
|
||||
# CONFIG_MMC_DW_HI3798MV200 is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
# CONFIG_MMC_DW_PCI is not set
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=y
|
||||
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MOTORCOMM_PHY=y
|
||||
CONFIG_MQ_IOSCHED_DEADLINE=y
|
||||
# CONFIG_MTD_CFI is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SG_DMA_FLAGS=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NEED_TASKS_RCU=y
|
||||
CONFIG_NET_DEVMEM=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=256
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_ROCKCHIP_EFUSE=y
|
||||
CONFIG_NVMEM_ROCKCHIP_OTP=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_NVME_CORE=y
|
||||
# CONFIG_NVME_HOST_AUTH is not set
|
||||
# CONFIG_NVME_HWMON is not set
|
||||
# CONFIG_NVME_MULTIPATH is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IOMMU=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SHIFT=12
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
# CONFIG_PANIC_ON_OOPS is not set
|
||||
CONFIG_PANIC_ON_OOPS_VALUE=0
|
||||
CONFIG_PANIC_TIMEOUT=0
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEASPM=y
|
||||
CONFIG_PCIEASPM_DEFAULT=y
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
# CONFIG_PCIEASPM_POWERSAVE is not set
|
||||
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCIE_ROCKCHIP=y
|
||||
CONFIG_PCIE_ROCKCHIP_DW=y
|
||||
CONFIG_PCIE_ROCKCHIP_DW_HOST=y
|
||||
CONFIG_PCIE_ROCKCHIP_HOST=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_STUB=y
|
||||
CONFIG_PCS_XPCS=y
|
||||
CONFIG_PER_VMA_LOCK=y
|
||||
# CONFIG_PFCP is not set
|
||||
CONFIG_PGTABLE_HAS_HUGE_LEAVES=y
|
||||
CONFIG_PGTABLE_LEVELS=4
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_PHY_ROCKCHIP_DP=y
|
||||
# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
|
||||
CONFIG_PHY_ROCKCHIP_EMMC=y
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
|
||||
CONFIG_PHY_ROCKCHIP_PCIE=y
|
||||
# CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX is not set
|
||||
CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
|
||||
CONFIG_PHY_ROCKCHIP_TYPEC=y
|
||||
CONFIG_PHY_ROCKCHIP_USB=y
|
||||
CONFIG_PHY_ROCKCHIP_USBDP=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_RK805=y
|
||||
CONFIG_PINCTRL_ROCKCHIP=y
|
||||
# CONFIG_PINCTRL_SCMI is not set
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PL330_DMA=y
|
||||
CONFIG_PLATFORM_MHU=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_DEVFREQ=y
|
||||
CONFIG_PM_DEVFREQ_EVENT=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_POWER_SUPPLY_HWMON=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PREEMPTION=y
|
||||
CONFIG_PREEMPT_BUILD=y
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
# CONFIG_QFMT_V2 is not set
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QUOTACTL=y
|
||||
CONFIG_RAID_ATTRS=y
|
||||
CONFIG_RANDOMIZE_BASE=y
|
||||
CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
# CONFIG_RAVE_SP_CORE is not set
|
||||
CONFIG_RCU_TRACE=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
# CONFIG_REGULATOR_ARM_SCMI is not set
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_RELOCATABLE=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_GPIO=y
|
||||
CONFIG_RESET_SCMI=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_ROCKCHIP_ERRATUM_3588001=y
|
||||
CONFIG_ROCKCHIP_GRF=y
|
||||
CONFIG_ROCKCHIP_IODOMAIN=y
|
||||
CONFIG_ROCKCHIP_IOMMU=y
|
||||
CONFIG_ROCKCHIP_MBOX=y
|
||||
CONFIG_ROCKCHIP_PHY=y
|
||||
CONFIG_ROCKCHIP_PM_DOMAINS=y
|
||||
CONFIG_ROCKCHIP_THERMAL=y
|
||||
CONFIG_ROCKCHIP_TIMER=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
# CONFIG_RPMB is not set
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RSEQ=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_RK808=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_NVMEM=y
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
# CONFIG_SCSI_LOWLEVEL is not set
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_SCSI_SAS_ATTRS=y
|
||||
CONFIG_SCSI_SAS_HOST_SMP=y
|
||||
CONFIG_SCSI_SAS_LIBSAS=y
|
||||
# CONFIG_SECURITY_DMESG_RESTRICT is not set
|
||||
# CONFIG_SENSORS_ARM_SCMI is not set
|
||||
CONFIG_SENSORS_ARM_SCPI=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_8250_EXAR=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_8250_PCILIB=y
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_AMBAKMI=y
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_DYNAMIC=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_SPI_ROCKCHIP_SFC=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_SPLIT_PMD_PTLOCKS=y
|
||||
CONFIG_SPLIT_PTE_PTLOCKS=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
# CONFIG_SQUASHFS_EMBEDDED is not set
|
||||
CONFIG_SQUASHFS_FILE_CACHE=y
|
||||
# CONFIG_SQUASHFS_FILE_DIRECT is not set
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_STACKDEPOT=y
|
||||
CONFIG_STACKDEPOT_MAX_FRAMES=64
|
||||
CONFIG_STACKPROTECTOR=y
|
||||
CONFIG_STACKPROTECTOR_PER_TASK=y
|
||||
CONFIG_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_STACKTRACE=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
CONFIG_STRICT_DEVMEM=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYSFS_SYSCALL=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
# CONFIG_TEXTSEARCH is not set
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TRACE_CLOCK=y
|
||||
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set
|
||||
CONFIG_TRANS_TABLE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_TYPEC=y
|
||||
# CONFIG_TYPEC_ANX7411 is not set
|
||||
CONFIG_TYPEC_FUSB302=y
|
||||
# CONFIG_TYPEC_HD3SS3220 is not set
|
||||
# CONFIG_TYPEC_MUX_FSA4480 is not set
|
||||
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
|
||||
# CONFIG_TYPEC_MUX_IT5205 is not set
|
||||
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
|
||||
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
|
||||
# CONFIG_TYPEC_MUX_PTN36502 is not set
|
||||
# CONFIG_TYPEC_MUX_WCD939X_USBSS is not set
|
||||
# CONFIG_TYPEC_RT1719 is not set
|
||||
# CONFIG_TYPEC_STUSB160X is not set
|
||||
# CONFIG_TYPEC_TCPCI is not set
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
# CONFIG_TYPEC_TPS6598X is not set
|
||||
# CONFIG_TYPEC_WUSB3801 is not set
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
# CONFIG_UEVENT_HELPER is not set
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_HOST=y
|
||||
CONFIG_USB_DWC3_OF_SIMPLE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
CONFIG_USB_HID=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_ULPI=y
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_USB_ULPI_VIEWPORT=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PLATFORM=y
|
||||
CONFIG_USER_STACKTRACE_SUPPORT=y
|
||||
CONFIG_VDSO_GETRANDOM=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VMCORE_INFO=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XARRAY_MULTI=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_ARM64=y
|
||||
CONFIG_XZ_DEC_ARMTHUMB=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
@@ -817,7 +817,11 @@ err_free_opp:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
static int rk3328_dmcfreq_remove(struct platform_device *pdev)
|
||||
#else
|
||||
static void rk3328_dmcfreq_remove(struct platform_device *pdev)
|
||||
#endif
|
||||
{
|
||||
struct rk3328_dmcfreq *dmcfreq = dev_get_drvdata(&pdev->dev);
|
||||
|
||||
@@ -827,7 +831,9 @@ static int rk3328_dmcfreq_remove(struct platform_device *pdev)
|
||||
devm_devfreq_unregister_opp_notifier(dmcfreq->dev, dmcfreq->devfreq);
|
||||
dev_pm_opp_of_remove_table(dmcfreq->dev);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static const struct of_device_id rk3328dmc_devfreq_of_match[] = {
|
||||
@@ -838,7 +844,11 @@ MODULE_DEVICE_TABLE(of, rk3328dmc_devfreq_of_match);
|
||||
|
||||
static struct platform_driver rk3328_dmcfreq_driver = {
|
||||
.probe = rk3328_dmcfreq_probe,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)
|
||||
.remove = rk3328_dmcfreq_remove,
|
||||
#else
|
||||
.remove_new = rk3328_dmcfreq_remove,
|
||||
#endif
|
||||
.driver = {
|
||||
.name = "rk3328-dmc-freq",
|
||||
.pm = &rk3328_dmcfreq_pm,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_pci.h>
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
From 6731d2c9039fbe1ecf21915eab3acee0a999508a Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Fri, 10 Jul 2020 21:38:20 +0200
|
||||
Subject: [PATCH] rockchip: use system LED for OpenWrt
|
||||
|
||||
Use the SYS LED on the casing for showing system status.
|
||||
|
||||
This patch is kept separate from the NanoPi R2S support patch, as i plan
|
||||
on submitting the device support upstream.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -6,6 +6,7 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "rk3328.dtsi"
|
||||
|
||||
@@ -17,6 +18,11 @@
|
||||
ethernet0 = &gmac2io;
|
||||
ethernet1 = &rtl8153;
|
||||
mmc0 = &sdmmc;
|
||||
+
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -49,19 +55,22 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
lan_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:lan";
|
||||
};
|
||||
|
||||
sys_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:red:sys";
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_led: led-2 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
- label = "nanopi-r2s:green:wan";
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -14,6 +14,11 @@
|
||||
ethernet0 = &gmac2io;
|
||||
mmc0 = &sdmmc;
|
||||
mmc1 = &emmc;
|
||||
+
|
||||
+ led-boot = &power_led;
|
||||
+ led-failsafe = &power_led;
|
||||
+ led-running = &power_led;
|
||||
+ led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen {
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
From edcc2833819f6750bf003b95a6ac856aced26274 Mon Sep 17 00:00:00 2001
|
||||
From: AnYun <amadeus@jmu.edu.cn>
|
||||
Date: Sat, 18 Mar 2023 23:05:16 +0800
|
||||
Subject: [PATCH] r8169: add LED configuration from OF
|
||||
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/phy.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/io.h>
|
||||
@@ -175,6 +176,7 @@ enum rtl_registers {
|
||||
MAR0 = 8, /* Multicast filter. */
|
||||
CounterAddrLow = 0x10,
|
||||
CounterAddrHigh = 0x14,
|
||||
+ CustomLED = 0x18,
|
||||
TxDescStartAddrLow = 0x20,
|
||||
TxDescStartAddrHigh = 0x24,
|
||||
TxHDescStartAddrLow = 0x28,
|
||||
@@ -5371,6 +5373,22 @@ static bool rtl_aspm_is_safe(struct rtl8
|
||||
return false;
|
||||
}
|
||||
|
||||
+static int rtl_led_configuration(struct rtl8169_private *tp)
|
||||
+{
|
||||
+ u32 led_data;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = of_property_read_u32(tp->pci_dev->dev.of_node,
|
||||
+ "realtek,led-data", &led_data);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ RTL_W16(tp, CustomLED, led_data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
struct rtl8169_private *tp;
|
||||
@@ -5539,6 +5557,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (!tp->counters)
|
||||
return -ENOMEM;
|
||||
|
||||
+ rtl_led_configuration(tp);
|
||||
pci_set_drvdata(pdev, tp);
|
||||
|
||||
rc = r8169_mdio_register(tp);
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From edcc2833819f6750bf003b95a6ac856aced26276 Mon Sep 17 00:00:00 2001
|
||||
From: AnYun <amadeus@jmu.edu.cn>
|
||||
Date: Mon, 3 Apr 2023 23:26:04 +0800
|
||||
Subject: [PATCH] net: phy: realtek: add LED configuration from OF for 8211f
|
||||
|
||||
---
|
||||
drivers/net/phy/realtek.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/realtek.c
|
||||
+++ b/drivers/net/phy/realtek.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#define RTL821x_EXT_PAGE_SELECT 0x1e
|
||||
#define RTL821x_PAGE_SELECT 0x1f
|
||||
|
||||
+#define RTL8211F_LCR 0x10
|
||||
+#define RTL8211F_EEELCR 0x11
|
||||
#define RTL8211F_PHYCR1 0x18
|
||||
#define RTL8211F_PHYCR2 0x19
|
||||
#define RTL8211F_INSR 0x1d
|
||||
@@ -372,6 +374,7 @@ static int rtl8211f_config_init(struct p
|
||||
struct rtl821x_priv *priv = phydev->priv;
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
u16 val_txdly, val_rxdly;
|
||||
+ u32 led_data;
|
||||
int ret;
|
||||
|
||||
ret = phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1,
|
||||
@@ -438,6 +441,15 @@ static int rtl8211f_config_init(struct p
|
||||
val_rxdly ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
+ ret = of_property_read_u32(dev->of_node,
|
||||
+ "realtek,led-data", &led_data);
|
||||
+ if (!ret) {
|
||||
+ phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04);
|
||||
+ phy_write(phydev, RTL8211F_LCR, led_data);
|
||||
+ phy_write(phydev, RTL8211F_EEELCR, 0x0);
|
||||
+ phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
|
||||
+ }
|
||||
+
|
||||
if (priv->has_phycr2) {
|
||||
ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2,
|
||||
RTL8211F_CLKOUT_EN, priv->phycr2);
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Sun, 26 Jul 2020 13:32:59 +0200
|
||||
Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S
|
||||
|
||||
This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
|
||||
NanoPi R2S. Add the correct value for the RTL8153 LED configuration
|
||||
register to match the blink behavior of the other port on the device.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++
|
||||
1 file changed, 1 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -407,6 +407,7 @@
|
||||
rtl8153: device@2 {
|
||||
compatible = "usbbda,8153";
|
||||
reg = <2>;
|
||||
+ realtek,led-data = <0x87>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S
|
||||
|
||||
The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
|
||||
while U-Boot requires the card to be in 3.3V mode.
|
||||
|
||||
Remove UHS support from the SD controller so the card remains in 3.3V
|
||||
mode. This reduces transfer speeds but ensures a reboot whether from
|
||||
userspace or following a kernel panic is always working.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
|
||||
@@ -336,7 +336,6 @@
|
||||
sd-uhs-sdr12;
|
||||
sd-uhs-sdr25;
|
||||
sd-uhs-sdr50;
|
||||
- sd-uhs-sdr104;
|
||||
vmmc-supply = <&vcc_sd>;
|
||||
vqmmc-supply = <&vcc_sdio>;
|
||||
status = "okay";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -121,6 +121,11 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&sdmmc {
|
||||
+ /delete-property/ sd-uhs-sdr104;
|
||||
+ cap-sd-highspeed;
|
||||
+};
|
||||
+
|
||||
&u2phy0_host {
|
||||
phy-supply = <&vdd_5v>;
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
|
||||
@@ -19,6 +19,13 @@
|
||||
model = "FriendlyElec NanoPi R4S";
|
||||
compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &sys_led;
|
||||
+ led-failsafe = &sys_led;
|
||||
+ led-running = &sys_led;
|
||||
+ led-upgrade = &sys_led;
|
||||
+ };
|
||||
+
|
||||
/delete-node/ display-subsystem;
|
||||
|
||||
gpio-leds {
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
From 0d329112c709d6cfedf0fffb19f0cc6b19043f6b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Wed, 20 Feb 2019 07:38:34 +0000
|
||||
Subject: [PATCH] mmc: core: set initial signal voltage on power off
|
||||
|
||||
Some boards have SD card connectors where the power rail cannot be switched
|
||||
off by the driver. If the card has not been power cycled, it may still be
|
||||
using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
|
||||
will fail to boot from a UHS card that continue to use 1.8V signaling.
|
||||
|
||||
Set initial signal voltage in mmc_power_off() to allow re-boot to function.
|
||||
|
||||
This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
|
||||
same issue have been seen on some Rockchip RK3399 boards.
|
||||
|
||||
I am sending this as a RFC because I have no insights into SD/MMC subsystem,
|
||||
this change fix a re-boot issue on my boards and does not break emmc/sdio.
|
||||
Is this an acceptable workaround? Any advice is appreciated.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/mmc/core/core.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1370,6 +1370,8 @@ void mmc_power_off(struct mmc_host *host
|
||||
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
host->ios.clock = 0;
|
||||
host->ios.vdd = 0;
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -64,7 +64,7 @@
|
||||
compatible = "rockchip,rk3568-pcie";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
- bus-range = <0x0 0xf>;
|
||||
+ bus-range = <0x10 0x1f>;
|
||||
clocks = <&cru ACLK_PCIE30X1_MST>, <&cru ACLK_PCIE30X1_SLV>,
|
||||
<&cru ACLK_PCIE30X1_DBI>, <&cru PCLK_PCIE30X1>,
|
||||
<&cru CLK_PCIE30X1_AUX_NDFT>;
|
||||
@@ -87,7 +87,7 @@
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <2>;
|
||||
max-link-speed = <3>;
|
||||
- msi-map = <0x0 &gic 0x1000 0x1000>;
|
||||
+ msi-map = <0x1000 &its 0x1000 0x1000>;
|
||||
num-lanes = <1>;
|
||||
phys = <&pcie30phy>;
|
||||
phy-names = "pcie-phy";
|
||||
@@ -117,7 +117,7 @@
|
||||
compatible = "rockchip,rk3568-pcie";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
- bus-range = <0x0 0xf>;
|
||||
+ bus-range = <0x20 0x2f>;
|
||||
clocks = <&cru ACLK_PCIE30X2_MST>, <&cru ACLK_PCIE30X2_SLV>,
|
||||
<&cru ACLK_PCIE30X2_DBI>, <&cru PCLK_PCIE30X2>,
|
||||
<&cru CLK_PCIE30X2_AUX_NDFT>;
|
||||
@@ -140,7 +140,7 @@
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <2>;
|
||||
max-link-speed = <3>;
|
||||
- msi-map = <0x0 &gic 0x2000 0x1000>;
|
||||
+ msi-map = <0x2000 &its 0x2000 0x1000>;
|
||||
num-lanes = <2>;
|
||||
phys = <&pcie30phy>;
|
||||
phy-names = "pcie-phy";
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -356,14 +356,21 @@
|
||||
|
||||
gic: interrupt-controller@fd400000 {
|
||||
compatible = "arm,gic-v3";
|
||||
+ #interrupt-cells = <3>;
|
||||
+ #address-cells = <2>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ interrupt-controller;
|
||||
+
|
||||
reg = <0x0 0xfd400000 0 0x10000>, /* GICD */
|
||||
- <0x0 0xfd460000 0 0x80000>; /* GICR */
|
||||
+ <0x0 0xfd460000 0 0xc0000>; /* GICR */
|
||||
interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- interrupt-controller;
|
||||
- #interrupt-cells = <3>;
|
||||
- mbi-alias = <0x0 0xfd410000>;
|
||||
- mbi-ranges = <296 24>;
|
||||
- msi-controller;
|
||||
+ its: interrupt-controller@fd440000 {
|
||||
+ compatible = "arm,gic-v3-its";
|
||||
+ msi-controller;
|
||||
+ #msi-cells = <1>;
|
||||
+ reg = <0x0 0xfd440000 0x0 0x20000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
usb_host0_ehci: usb@fd800000 {
|
||||
@@ -1038,7 +1045,7 @@
|
||||
num-ib-windows = <6>;
|
||||
num-ob-windows = <2>;
|
||||
max-link-speed = <2>;
|
||||
- msi-map = <0x0 &gic 0x0 0x1000>;
|
||||
+ msi-map = <0x0 &its 0x0 0x1000>;
|
||||
num-lanes = <1>;
|
||||
phys = <&combphy2 PHY_TYPE_PCIE>;
|
||||
phy-names = "pcie-phy";
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
From 536378a084c6a4148141e132efee2fa9a464e007 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Geis <pgwipeout@gmail.com>
|
||||
Date: Thu, 3 Jun 2021 11:36:35 -0400
|
||||
Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
|
||||
---
|
||||
drivers/irqchip/irq-gic-v3-its.c | 70 +++++++++++++++++++++++++++++---
|
||||
1 file changed, 65 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/irqchip/irq-gic-common.h
|
||||
+++ b/drivers/irqchip/irq-gic-common.h
|
||||
@@ -34,5 +34,6 @@ extern const struct msi_parent_ops gic_v
|
||||
#define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0)
|
||||
#define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1)
|
||||
#define RDIST_FLAGS_FORCE_NON_SHAREABLE (1 << 2)
|
||||
+#define RDIST_FLAGS_FORCE_NO_LOCAL_CACHE (1 << 3)
|
||||
|
||||
#endif /* _IRQ_GIC_COMMON_H */
|
||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||
@@ -2183,6 +2183,11 @@ static struct page *its_allocate_prop_ta
|
||||
{
|
||||
struct page *prop_page;
|
||||
|
||||
+ if (gic_rdists->flags & RDIST_FLAGS_FORCE_NO_LOCAL_CACHE) {
|
||||
+ pr_debug("ITS ALLOCATE PROP WORKAROUND\n");
|
||||
+ gfp_flags |= GFP_DMA;
|
||||
+ }
|
||||
+
|
||||
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
||||
if (!prop_page)
|
||||
return NULL;
|
||||
@@ -2305,6 +2310,7 @@ static int its_setup_baser(struct its_no
|
||||
u64 baser_phys, tmp;
|
||||
u32 alloc_pages, psz;
|
||||
struct page *page;
|
||||
+ gfp_t gfp_flags;
|
||||
void *base;
|
||||
|
||||
psz = baser->psz;
|
||||
@@ -2317,7 +2323,10 @@ static int its_setup_baser(struct its_no
|
||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, order);
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (gic_rdists->flags & RDIST_FLAGS_FORCE_NO_LOCAL_CACHE)
|
||||
+ gfp_flags |= GFP_DMA;
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags, order);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2957,6 +2966,10 @@ static struct page *its_allocate_pending
|
||||
{
|
||||
struct page *pend_page;
|
||||
|
||||
+ if (gic_rdists->flags & RDIST_FLAGS_FORCE_NO_LOCAL_CACHE) {
|
||||
+ gfp_flags |= GFP_DMA;
|
||||
+ }
|
||||
+
|
||||
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
||||
get_order(LPI_PENDBASE_SZ));
|
||||
if (!pend_page)
|
||||
@@ -3305,7 +3318,12 @@ static bool its_alloc_table_entry(struct
|
||||
|
||||
/* Allocate memory for 2nd level table */
|
||||
if (!table[idx]) {
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO;
|
||||
+ if (gic_rdists->flags & RDIST_FLAGS_FORCE_NO_LOCAL_CACHE) {
|
||||
+ gfp_flags |= GFP_DMA;
|
||||
+ }
|
||||
+
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(baser->psz));
|
||||
if (!page)
|
||||
return false;
|
||||
@@ -3389,6 +3407,7 @@ static struct its_device *its_create_dev
|
||||
unsigned long *lpi_map = NULL;
|
||||
unsigned long flags;
|
||||
u16 *col_map = NULL;
|
||||
+ gfp_t gfp_flags;
|
||||
void *itt;
|
||||
int lpi_base;
|
||||
int nr_lpis;
|
||||
@@ -3401,7 +3420,11 @@ static struct its_device *its_create_dev
|
||||
if (WARN_ON(!is_power_of_2(nvecs)))
|
||||
nvecs = roundup_pow_of_two(nvecs);
|
||||
|
||||
- dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
+ gfp_flags = GFP_KERNEL;
|
||||
+ if (gic_rdists->flags & RDIST_FLAGS_FORCE_NO_LOCAL_CACHE)
|
||||
+ gfp_flags |= GFP_DMA;
|
||||
+
|
||||
+ dev = kzalloc(sizeof(*dev), gfp_flags);
|
||||
/*
|
||||
* Even if the device wants a single LPI, the ITT must be
|
||||
* sized as a power of two (and you need at least one bit...).
|
||||
@@ -3409,7 +3432,7 @@ static struct its_device *its_create_dev
|
||||
nr_ites = max(2, nvecs);
|
||||
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||
- itt = kzalloc_node(sz, GFP_KERNEL, its->numa_node);
|
||||
+ itt = kzalloc_node(sz, gfp_flags, its->numa_node);
|
||||
if (alloc_lpis) {
|
||||
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
||||
if (lpi_map)
|
||||
@@ -4771,6 +4794,21 @@ static bool __maybe_unused its_enable_qu
|
||||
return true;
|
||||
}
|
||||
|
||||
+static bool __maybe_unused its_enable_rk3568001(void *data)
|
||||
+{
|
||||
+ struct its_node *its = data;
|
||||
+
|
||||
+ if (!of_machine_is_compatible("rockchip,rk3566") &&
|
||||
+ !of_machine_is_compatible("rockchip,rk3568"))
|
||||
+ return false;
|
||||
+
|
||||
+ its->flags |= ITS_FLAGS_FORCE_NON_SHAREABLE;
|
||||
+ gic_rdists->flags |= RDIST_FLAGS_FORCE_NON_SHAREABLE |
|
||||
+ RDIST_FLAGS_FORCE_NO_LOCAL_CACHE;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
static bool __maybe_unused its_enable_rk3588001(void *data)
|
||||
{
|
||||
struct its_node *its = data;
|
||||
@@ -4857,6 +4895,12 @@ static const struct gic_quirk its_quirks
|
||||
#endif
|
||||
#ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
|
||||
{
|
||||
+ .desc = "ITS: Rockchip erratum RK3568001",
|
||||
+ .iidr = 0x0201743b,
|
||||
+ .mask = 0xffffffff,
|
||||
+ .init = its_enable_rk3568001,
|
||||
+ },
|
||||
+ {
|
||||
.desc = "ITS: Rockchip erratum RK3588001",
|
||||
.iidr = 0x0201743b,
|
||||
.mask = 0xffffffff,
|
||||
@@ -5125,6 +5169,7 @@ static int __init its_probe_one(struct i
|
||||
{
|
||||
u64 baser, tmp;
|
||||
struct page *page;
|
||||
+ gfp_t gfp_flags;
|
||||
u32 ctlr;
|
||||
int err;
|
||||
|
||||
@@ -5160,7 +5205,9 @@ static int __init its_probe_one(struct i
|
||||
}
|
||||
}
|
||||
|
||||
- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO,
|
||||
+ gfp_flags = GFP_KERNEL | __GFP_ZERO | GFP_DMA;
|
||||
+
|
||||
+ page = alloc_pages_node(its->numa_node, gfp_flags,
|
||||
get_order(ITS_CMD_QUEUE_SZ));
|
||||
if (!page) {
|
||||
err = -ENOMEM;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -175,11 +175,13 @@
|
||||
clocks = <&cru SCLK_GMAC0>, <&cru SCLK_GMAC0_RX_TX>,
|
||||
<&cru SCLK_GMAC0_RX_TX>, <&cru CLK_MAC0_REFOUT>,
|
||||
<&cru ACLK_GMAC0>, <&cru PCLK_GMAC0>,
|
||||
- <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_GMAC0_PTP_REF>;
|
||||
+ <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_GMAC0_PTP_REF>,
|
||||
+ <&cru PCLK_XPCS>;
|
||||
clock-names = "stmmaceth", "mac_clk_rx",
|
||||
"mac_clk_tx", "clk_mac_refout",
|
||||
"aclk_mac", "pclk_mac",
|
||||
- "clk_mac_speed", "ptp_ref";
|
||||
+ "clk_mac_speed", "ptp_ref",
|
||||
+ "pclk_xpcs";
|
||||
resets = <&cru SRST_A_GMAC0>;
|
||||
reset-names = "stmmaceth";
|
||||
rockchip,grf = <&grf>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -417,6 +417,12 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ xpcs: syscon@fda00000 {
|
||||
+ compatible = "rockchip,rk3568-xpcs", "syscon";
|
||||
+ reg = <0x0 0xfda00000 0x0 0x200000>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
pmugrf: syscon@fdc20000 {
|
||||
compatible = "rockchip,rk3568-pmugrf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xfdc20000 0x0 0x10000>;
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
From ca89ea7e0760c096c6fd807d321ecb8416f8cd9d Mon Sep 17 00:00:00 2001
|
||||
From: David Wu <david.wu@rock-chips.com>
|
||||
Date: Thu, 31 Dec 2020 18:32:03 +0800
|
||||
Subject: [PATCH] ethernet: stmicro: stmmac: Add SGMII/QSGMII support for
|
||||
RK3568
|
||||
|
||||
After the completion of Clause 37 auto-negotiation, xpcs automatically
|
||||
switches to the negotiated speed for 10/100/1000M.
|
||||
|
||||
Change-Id: Iab9dd6ee61a35bf89fd3a0721f5d398de501a7ec
|
||||
Signed-off-by: David Wu <david.wu@rock-chips.com>
|
||||
---
|
||||
.../net/ethernet/stmicro/stmmac/dwmac-rk.c | 228 +++++++++++++++++-
|
||||
1 file changed, 217 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/phy.h>
|
||||
+#include <linux/phy/phy.h>
|
||||
#include <linux/of_net.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
@@ -28,6 +29,8 @@ struct rk_gmac_ops {
|
||||
void (*set_to_rgmii)(struct rk_priv_data *bsp_priv,
|
||||
int tx_delay, int rx_delay);
|
||||
void (*set_to_rmii)(struct rk_priv_data *bsp_priv);
|
||||
+ void (*set_to_sgmii)(struct rk_priv_data *bsp_priv);
|
||||
+ void (*set_to_qsgmii)(struct rk_priv_data *bsp_priv);
|
||||
void (*set_rgmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*set_rmii_speed)(struct rk_priv_data *bsp_priv, int speed);
|
||||
void (*set_clock_selection)(struct rk_priv_data *bsp_priv, bool input,
|
||||
@@ -38,7 +41,7 @@ struct rk_gmac_ops {
|
||||
};
|
||||
|
||||
static const char * const rk_clocks[] = {
|
||||
- "aclk_mac", "pclk_mac", "mac_clk_tx", "clk_mac_speed",
|
||||
+ "aclk_mac", "pclk_mac", "pclk_xpcs", "mac_clk_tx", "clk_mac_speed",
|
||||
};
|
||||
|
||||
static const char * const rk_rmii_clocks[] = {
|
||||
@@ -48,6 +51,7 @@ static const char * const rk_rmii_clocks
|
||||
enum rk_clocks_index {
|
||||
RK_ACLK_MAC = 0,
|
||||
RK_PCLK_MAC,
|
||||
+ RK_PCLK_XPCS,
|
||||
RK_MAC_CLK_TX,
|
||||
RK_CLK_MAC_SPEED,
|
||||
RK_MAC_CLK_RX,
|
||||
@@ -79,6 +83,7 @@ struct rk_priv_data {
|
||||
|
||||
struct regmap *grf;
|
||||
struct regmap *php_grf;
|
||||
+ struct regmap *xpcs;
|
||||
};
|
||||
|
||||
#define HIWORD_UPDATE(val, mask, shift) \
|
||||
@@ -91,6 +96,128 @@ struct rk_priv_data {
|
||||
(((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE : soc##_GMAC_TXCLK_DLY_DISABLE) | \
|
||||
((rx) ? soc##_GMAC_RXCLK_DLY_ENABLE : soc##_GMAC_RXCLK_DLY_DISABLE))
|
||||
|
||||
+/* XPCS */
|
||||
+#define XPCS_APB_INCREMENT (0x4)
|
||||
+#define XPCS_APB_MASK GENMASK_ULL(20, 0)
|
||||
+
|
||||
+#define SR_MII_BASE (0x1F0000)
|
||||
+#define SR_MII1_BASE (0x1A0000)
|
||||
+
|
||||
+#define VR_MII_DIG_CTRL1 (0x8000)
|
||||
+#define VR_MII_AN_CTRL (0x8001)
|
||||
+#define VR_MII_AN_INTR_STS (0x8002)
|
||||
+#define VR_MII_LINK_TIMER_CTRL (0x800A)
|
||||
+
|
||||
+#define SR_MII_CTRL_AN_ENABLE \
|
||||
+ (BMCR_ANENABLE | BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000)
|
||||
+#define MII_MAC_AUTO_SW (0x0200)
|
||||
+#define PCS_MODE_OFFSET (0x1)
|
||||
+#define MII_AN_INTR_EN (0x1)
|
||||
+#define PCS_SGMII_MODE (0x2 << PCS_MODE_OFFSET)
|
||||
+#define PCS_QSGMII_MODE (0X3 << PCS_MODE_OFFSET)
|
||||
+#define VR_MII_CTRL_SGMII_AN_EN (PCS_SGMII_MODE | MII_AN_INTR_EN)
|
||||
+#define VR_MII_CTRL_QSGMII_AN_EN (PCS_QSGMII_MODE | MII_AN_INTR_EN)
|
||||
+
|
||||
+#define SR_MII_OFFSET(_x) ({ \
|
||||
+ typeof(_x) (x) = (_x); \
|
||||
+ (((x) == 0) ? SR_MII_BASE : (SR_MII1_BASE + ((x) - 1) * 0x10000)); \
|
||||
+}) \
|
||||
+
|
||||
+static int xpcs_read(void *priv, int reg)
|
||||
+{
|
||||
+ struct rk_priv_data *bsp_priv = (struct rk_priv_data *)priv;
|
||||
+ int ret, val;
|
||||
+
|
||||
+ ret = regmap_read(bsp_priv->xpcs,
|
||||
+ (u32)(reg * XPCS_APB_INCREMENT) & XPCS_APB_MASK,
|
||||
+ &val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static int xpcs_write(void *priv, int reg, u16 value)
|
||||
+{
|
||||
+ struct rk_priv_data *bsp_priv = (struct rk_priv_data *)priv;
|
||||
+
|
||||
+ return regmap_write(bsp_priv->xpcs,
|
||||
+ (reg * XPCS_APB_INCREMENT) & XPCS_APB_MASK, value);
|
||||
+}
|
||||
+
|
||||
+static int xpcs_poll_reset(struct rk_priv_data *bsp_priv, int dev)
|
||||
+{
|
||||
+ /* Poll until the reset bit clears (50ms per retry == 0.6 sec) */
|
||||
+ unsigned int retries = 12;
|
||||
+ int ret;
|
||||
+
|
||||
+ do {
|
||||
+ msleep(50);
|
||||
+ ret = xpcs_read(bsp_priv, SR_MII_OFFSET(dev) + MDIO_CTRL1);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+ } while (ret & MDIO_CTRL1_RESET && --retries);
|
||||
+
|
||||
+ return (ret & MDIO_CTRL1_RESET) ? -ETIMEDOUT : 0;
|
||||
+}
|
||||
+
|
||||
+static int xpcs_soft_reset(struct rk_priv_data *bsp_priv, int dev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = xpcs_write(bsp_priv, SR_MII_OFFSET(dev) + MDIO_CTRL1,
|
||||
+ MDIO_CTRL1_RESET);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return xpcs_poll_reset(bsp_priv, dev);
|
||||
+}
|
||||
+
|
||||
+static int xpcs_setup(struct rk_priv_data *bsp_priv, int mode)
|
||||
+{
|
||||
+ int ret, i, idx = bsp_priv->id;
|
||||
+ u32 val;
|
||||
+
|
||||
+ if (mode == PHY_INTERFACE_MODE_QSGMII && idx > 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = xpcs_soft_reset(bsp_priv, idx);
|
||||
+ if (ret) {
|
||||
+ dev_err(&bsp_priv->pdev->dev, "xpcs_soft_reset fail %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(0) + VR_MII_AN_INTR_STS, 0x0);
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(0) + VR_MII_LINK_TIMER_CTRL, 0x1);
|
||||
+
|
||||
+ if (mode == PHY_INTERFACE_MODE_SGMII)
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(0) + VR_MII_AN_CTRL,
|
||||
+ VR_MII_CTRL_SGMII_AN_EN);
|
||||
+ else
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(0) + VR_MII_AN_CTRL,
|
||||
+ VR_MII_CTRL_QSGMII_AN_EN);
|
||||
+
|
||||
+ if (mode == PHY_INTERFACE_MODE_QSGMII) {
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ val = xpcs_read(bsp_priv,
|
||||
+ SR_MII_OFFSET(i) + VR_MII_DIG_CTRL1);
|
||||
+ xpcs_write(bsp_priv,
|
||||
+ SR_MII_OFFSET(i) + VR_MII_DIG_CTRL1,
|
||||
+ val | MII_MAC_AUTO_SW);
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(i) + MII_BMCR,
|
||||
+ SR_MII_CTRL_AN_ENABLE);
|
||||
+ }
|
||||
+ } else {
|
||||
+ val = xpcs_read(bsp_priv, SR_MII_OFFSET(idx) + VR_MII_DIG_CTRL1);
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(idx) + VR_MII_DIG_CTRL1,
|
||||
+ val | MII_MAC_AUTO_SW);
|
||||
+ xpcs_write(bsp_priv, SR_MII_OFFSET(idx) + MII_BMCR,
|
||||
+ SR_MII_CTRL_AN_ENABLE);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
#define PX30_GRF_GMAC_CON1 0x0904
|
||||
|
||||
/* PX30_GRF_GMAC_CON1 */
|
||||
@@ -1019,6 +1146,7 @@ static const struct rk_gmac_ops rk3399_o
|
||||
#define RK3568_GRF_GMAC1_CON1 0x038c
|
||||
|
||||
/* RK3568_GRF_GMAC0_CON1 && RK3568_GRF_GMAC1_CON1 */
|
||||
+#define RK3568_GMAC_GMII_MODE GRF_BIT(7)
|
||||
#define RK3568_GMAC_PHY_INTF_SEL_RGMII \
|
||||
(GRF_BIT(4) | GRF_CLR_BIT(5) | GRF_CLR_BIT(6))
|
||||
#define RK3568_GMAC_PHY_INTF_SEL_RMII \
|
||||
@@ -1034,6 +1162,46 @@ static const struct rk_gmac_ops rk3399_o
|
||||
#define RK3568_GMAC_CLK_RX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 8)
|
||||
#define RK3568_GMAC_CLK_TX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 0)
|
||||
|
||||
+#define RK3568_PIPE_GRF_XPCS_CON0 0X0040
|
||||
+
|
||||
+#define RK3568_PIPE_GRF_XPCS_QGMII_MAC_SEL GRF_BIT(0)
|
||||
+#define RK3568_PIPE_GRF_XPCS_SGMII_MAC_SEL GRF_BIT(1)
|
||||
+#define RK3568_PIPE_GRF_XPCS_PHY_READY GRF_BIT(2)
|
||||
+
|
||||
+static void rk3568_set_to_sgmii(struct rk_priv_data *bsp_priv)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ u32 con1;
|
||||
+
|
||||
+ if (IS_ERR(bsp_priv->grf)) {
|
||||
+ dev_err(dev, "Missing rockchip,grf property\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ con1 = (bsp_priv->id == 1) ? RK3568_GRF_GMAC1_CON1 :
|
||||
+ RK3568_GRF_GMAC0_CON1;
|
||||
+ regmap_write(bsp_priv->grf, con1, RK3568_GMAC_GMII_MODE);
|
||||
+
|
||||
+ xpcs_setup(bsp_priv, PHY_INTERFACE_MODE_SGMII);
|
||||
+}
|
||||
+
|
||||
+static void rk3568_set_to_qsgmii(struct rk_priv_data *bsp_priv)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ u32 con1;
|
||||
+
|
||||
+ if (IS_ERR(bsp_priv->grf)) {
|
||||
+ dev_err(dev, "Missing rockchip,grf property\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ con1 = (bsp_priv->id == 1) ? RK3568_GRF_GMAC1_CON1 :
|
||||
+ RK3568_GRF_GMAC0_CON1;
|
||||
+ regmap_write(bsp_priv->grf, con1, RK3568_GMAC_GMII_MODE);
|
||||
+
|
||||
+ xpcs_setup(bsp_priv, PHY_INTERFACE_MODE_QSGMII);
|
||||
+}
|
||||
+
|
||||
static void rk3568_set_to_rgmii(struct rk_priv_data *bsp_priv,
|
||||
int tx_delay, int rx_delay)
|
||||
{
|
||||
@@ -1106,6 +1274,8 @@ static void rk3568_set_gmac_speed(struct
|
||||
static const struct rk_gmac_ops rk3568_ops = {
|
||||
.set_to_rgmii = rk3568_set_to_rgmii,
|
||||
.set_to_rmii = rk3568_set_to_rmii,
|
||||
+ .set_to_sgmii = rk3568_set_to_sgmii,
|
||||
+ .set_to_qsgmii = rk3568_set_to_qsgmii,
|
||||
.set_rgmii_speed = rk3568_set_gmac_speed,
|
||||
.set_rmii_speed = rk3568_set_gmac_speed,
|
||||
.regs_valid = true,
|
||||
@@ -1733,7 +1903,7 @@ static int gmac_clk_enable(struct rk_pri
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
|
||||
+static int rk_gmac_phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
|
||||
{
|
||||
struct regulator *ldo = bsp_priv->regulator;
|
||||
int ret;
|
||||
@@ -1832,6 +2002,18 @@ static struct rk_priv_data *rk_gmac_setu
|
||||
"rockchip,grf");
|
||||
bsp_priv->php_grf = syscon_regmap_lookup_by_phandle(dev->of_node,
|
||||
"rockchip,php-grf");
|
||||
+ bsp_priv->xpcs = syscon_regmap_lookup_by_phandle(dev->of_node,
|
||||
+ "rockchip,xpcs");
|
||||
+ if (!IS_ERR(bsp_priv->xpcs)) {
|
||||
+ struct phy *comphy;
|
||||
+
|
||||
+ comphy = devm_of_phy_get(&pdev->dev, dev->of_node, NULL);
|
||||
+ if (IS_ERR(comphy))
|
||||
+ dev_err(dev, "devm_of_phy_get error\n");
|
||||
+ ret = phy_init(comphy);
|
||||
+ if (ret)
|
||||
+ dev_err(dev, "phy_init error\n");
|
||||
+ }
|
||||
|
||||
if (plat->phy_node) {
|
||||
bsp_priv->integrated_phy = of_property_read_bool(plat->phy_node,
|
||||
@@ -1909,11 +2091,19 @@ static int rk_gmac_powerup(struct rk_pri
|
||||
dev_info(dev, "init for RMII\n");
|
||||
bsp_priv->ops->set_to_rmii(bsp_priv);
|
||||
break;
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
+ dev_info(dev, "init for SGMII\n");
|
||||
+ bsp_priv->ops->set_to_sgmii(bsp_priv);
|
||||
+ break;
|
||||
+ case PHY_INTERFACE_MODE_QSGMII:
|
||||
+ dev_info(dev, "init for QSGMII\n");
|
||||
+ bsp_priv->ops->set_to_qsgmii(bsp_priv);
|
||||
+ break;
|
||||
default:
|
||||
dev_err(dev, "NO interface defined!\n");
|
||||
}
|
||||
|
||||
- ret = phy_power_on(bsp_priv, true);
|
||||
+ ret = rk_gmac_phy_power_on(bsp_priv, true);
|
||||
if (ret) {
|
||||
gmac_clk_enable(bsp_priv, false);
|
||||
return ret;
|
||||
@@ -1934,7 +2124,7 @@ static void rk_gmac_powerdown(struct rk_
|
||||
|
||||
pm_runtime_put_sync(&gmac->pdev->dev);
|
||||
|
||||
- phy_power_on(gmac, false);
|
||||
+ rk_gmac_phy_power_on(gmac, false);
|
||||
gmac_clk_enable(gmac, false);
|
||||
}
|
||||
|
||||
@@ -1955,6 +2145,9 @@ static void rk_fix_speed(void *priv, uns
|
||||
if (bsp_priv->ops->set_rmii_speed)
|
||||
bsp_priv->ops->set_rmii_speed(bsp_priv, speed);
|
||||
break;
|
||||
+ case PHY_INTERFACE_MODE_SGMII:
|
||||
+ case PHY_INTERFACE_MODE_QSGMII:
|
||||
+ break;
|
||||
default:
|
||||
dev_err(dev, "unsupported interface %d", bsp_priv->phy_iface);
|
||||
}
|
||||
+375
@@ -0,0 +1,375 @@
|
||||
From: Frank Wang <frawang.cn@gmail.com>
|
||||
To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
|
||||
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de
|
||||
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org,
|
||||
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
|
||||
william.wu@rock-chips.com, tim.chen@rock-chips.com,
|
||||
Kever Yang <kever.yang@rock-chips.com>,
|
||||
Frank Wang <frank.wang@rock-chips.com>
|
||||
Subject: [PATCH v3 2/2] phy: rockchip-naneng-combo: add rk3576 support
|
||||
Date: Fri, 18 Oct 2024 14:25:26 +0800 [thread overview]
|
||||
Message-ID: <20241018062526.33994-2-frawang.cn@gmail.com> (raw)
|
||||
In-Reply-To: <20241018062526.33994-1-frawang.cn@gmail.com>
|
||||
|
||||
From: Kever Yang <kever.yang@rock-chips.com>
|
||||
|
||||
Rockchip RK3576 integrates two naneng-combo PHY, PHY0 is used for
|
||||
PCIE and SATA, PHY1 is used for PCIE, SATA and USB3.
|
||||
|
||||
This adds device specific data support.
|
||||
|
||||
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
|
||||
Signed-off-by: William Wu <william.wu@rock-chips.com>
|
||||
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
|
||||
---
|
||||
Changelog:
|
||||
v3:
|
||||
- add detail commit contents.
|
||||
- using FIELD_PREP() instead of bit shift.
|
||||
- leave a blank line after each switch break case.
|
||||
|
||||
v2:
|
||||
- using constants macro instead of magic values.
|
||||
- add more comments for PHY tuning operations.
|
||||
|
||||
v1:
|
||||
- https://patchwork.kernel.org/project/linux-phy/patch/20241015013351.4884-2-frawang.cn@gmail.com/
|
||||
|
||||
.../rockchip/phy-rockchip-naneng-combphy.c | 279 ++++++++++++++++++
|
||||
1 file changed, 279 insertions(+)
|
||||
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
@@ -37,6 +37,10 @@
|
||||
#define PHYREG8 0x1C
|
||||
#define PHYREG8_SSC_EN BIT(4)
|
||||
|
||||
+#define PHYREG10 0x24
|
||||
+#define PHYREG10_SSC_PCM_MASK GENMASK(3, 0)
|
||||
+#define PHYREG10_SSC_PCM_3500PPM 7
|
||||
+
|
||||
#define PHYREG11 0x28
|
||||
#define PHYREG11_SU_TRIM_0_7 0xF0
|
||||
|
||||
@@ -61,17 +65,26 @@
|
||||
#define PHYREG16 0x3C
|
||||
#define PHYREG16_SSC_CNT_VALUE 0x5f
|
||||
|
||||
+#define PHYREG17 0x40
|
||||
+
|
||||
#define PHYREG18 0x44
|
||||
#define PHYREG18_PLL_LOOP 0x32
|
||||
|
||||
+#define PHYREG21 0x50
|
||||
+#define PHYREG21_RX_SQUELCH_VAL 0x0D
|
||||
+
|
||||
#define PHYREG27 0x6C
|
||||
#define PHYREG27_RX_TRIM_RK3588 0x4C
|
||||
|
||||
+#define PHYREG30 0x74
|
||||
+
|
||||
#define PHYREG32 0x7C
|
||||
#define PHYREG32_SSC_MASK GENMASK(7, 4)
|
||||
+#define PHYREG32_SSC_DIR_MASK GENMASK(5, 4)
|
||||
#define PHYREG32_SSC_DIR_SHIFT 4
|
||||
#define PHYREG32_SSC_UPWARD 0
|
||||
#define PHYREG32_SSC_DOWNWARD 1
|
||||
+#define PHYREG32_SSC_OFFSET_MASK GENMASK(7, 6)
|
||||
#define PHYREG32_SSC_OFFSET_SHIFT 6
|
||||
#define PHYREG32_SSC_OFFSET_500PPM 1
|
||||
|
||||
@@ -79,6 +92,7 @@
|
||||
#define PHYREG33_PLL_KVCO_MASK GENMASK(4, 2)
|
||||
#define PHYREG33_PLL_KVCO_SHIFT 2
|
||||
#define PHYREG33_PLL_KVCO_VALUE 2
|
||||
+#define PHYREG33_PLL_KVCO_VALUE_RK3576 4
|
||||
|
||||
struct rockchip_combphy_priv;
|
||||
|
||||
@@ -98,6 +112,7 @@ struct rockchip_combphy_grfcfg {
|
||||
struct combphy_reg pipe_rxterm_set;
|
||||
struct combphy_reg pipe_txelec_set;
|
||||
struct combphy_reg pipe_txcomp_set;
|
||||
+ struct combphy_reg pipe_clk_24m;
|
||||
struct combphy_reg pipe_clk_25m;
|
||||
struct combphy_reg pipe_clk_100m;
|
||||
struct combphy_reg pipe_phymode_sel;
|
||||
@@ -584,6 +599,266 @@ static const struct rockchip_combphy_cfg
|
||||
.combphy_cfg = rk3568_combphy_cfg,
|
||||
};
|
||||
|
||||
+static int rk3576_combphy_cfg(struct rockchip_combphy_priv *priv)
|
||||
+{
|
||||
+ const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
|
||||
+ unsigned long rate;
|
||||
+ u32 val;
|
||||
+
|
||||
+ switch (priv->type) {
|
||||
+ case PHY_TYPE_PCIE:
|
||||
+ /* Set SSC downward spread spectrum */
|
||||
+ val = FIELD_PREP(PHYREG32_SSC_MASK, PHYREG32_SSC_DOWNWARD);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG32_SSC_MASK, val, PHYREG32);
|
||||
+
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_pcie, true);
|
||||
+ break;
|
||||
+
|
||||
+ case PHY_TYPE_USB3:
|
||||
+ /* Set SSC downward spread spectrum */
|
||||
+ val = FIELD_PREP(PHYREG32_SSC_MASK, PHYREG32_SSC_DOWNWARD);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG32_SSC_MASK, val, PHYREG32);
|
||||
+
|
||||
+ /* Enable adaptive CTLE for USB3.0 Rx */
|
||||
+ val = readl(priv->mmio + PHYREG15);
|
||||
+ val |= PHYREG15_CTLE_EN;
|
||||
+ writel(val, priv->mmio + PHYREG15);
|
||||
+
|
||||
+ /* Set PLL KVCO fine tuning signals */
|
||||
+ rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK, BIT(3), PHYREG33);
|
||||
+
|
||||
+ /* Set PLL LPF R1 to su_trim[10:7]=1001 */
|
||||
+ writel(PHYREG12_PLL_LPF_ADJ_VALUE, priv->mmio + PHYREG12);
|
||||
+
|
||||
+ /* Set PLL input clock divider 1/2 */
|
||||
+ val = FIELD_PREP(PHYREG6_PLL_DIV_MASK, PHYREG6_PLL_DIV_2);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG6_PLL_DIV_MASK, val, PHYREG6);
|
||||
+
|
||||
+ /* Set PLL loop divider */
|
||||
+ writel(PHYREG18_PLL_LOOP, priv->mmio + PHYREG18);
|
||||
+
|
||||
+ /* Set PLL KVCO to min and set PLL charge pump current to max */
|
||||
+ writel(PHYREG11_SU_TRIM_0_7, priv->mmio + PHYREG11);
|
||||
+
|
||||
+ /* Set Rx squelch input filler bandwidth */
|
||||
+ writel(PHYREG21_RX_SQUELCH_VAL, priv->mmio + PHYREG21);
|
||||
+
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txcomp_sel, false);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txelec_sel, false);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->usb_mode_set, true);
|
||||
+ break;
|
||||
+
|
||||
+ case PHY_TYPE_SATA:
|
||||
+ /* Enable adaptive CTLE for SATA Rx */
|
||||
+ val = readl(priv->mmio + PHYREG15);
|
||||
+ val |= PHYREG15_CTLE_EN;
|
||||
+ writel(val, priv->mmio + PHYREG15);
|
||||
+
|
||||
+ /* Set tx_rterm = 50 ohm and rx_rterm = 43.5 ohm */
|
||||
+ val = PHYREG7_TX_RTERM_50OHM << PHYREG7_TX_RTERM_SHIFT;
|
||||
+ val |= PHYREG7_RX_RTERM_44OHM << PHYREG7_RX_RTERM_SHIFT;
|
||||
+ writel(val, priv->mmio + PHYREG7);
|
||||
+
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_sata, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_sata, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_sata, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_sata, true);
|
||||
+ rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_con0_for_sata, true);
|
||||
+ rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_con1_for_sata, true);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(priv->dev, "incompatible PHY type\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ rate = clk_get_rate(priv->refclk);
|
||||
+
|
||||
+ switch (rate) {
|
||||
+ case REF_CLOCK_24MHz:
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_24m, true);
|
||||
+ if (priv->type == PHY_TYPE_USB3 || priv->type == PHY_TYPE_SATA) {
|
||||
+ /* Set ssc_cnt[9:0]=0101111101 & 31.5KHz */
|
||||
+ val = FIELD_PREP(PHYREG15_SSC_CNT_MASK, PHYREG15_SSC_CNT_VALUE);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG15_SSC_CNT_MASK,
|
||||
+ val, PHYREG15);
|
||||
+
|
||||
+ writel(PHYREG16_SSC_CNT_VALUE, priv->mmio + PHYREG16);
|
||||
+ } else if (priv->type == PHY_TYPE_PCIE) {
|
||||
+ /* PLL KVCO tuning fine */
|
||||
+ val = FIELD_PREP(PHYREG33_PLL_KVCO_MASK, PHYREG33_PLL_KVCO_VALUE_RK3576);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK,
|
||||
+ val, PHYREG33);
|
||||
+
|
||||
+ /* Set up rx_pck invert and rx msb to disable */
|
||||
+ writel(0x00, priv->mmio + PHYREG27);
|
||||
+
|
||||
+ /*
|
||||
+ * Set up SU adjust signal:
|
||||
+ * su_trim[7:0], PLL KVCO adjust bits[2:0] to min
|
||||
+ * su_trim[15:8], PLL LPF R1 adujst bits[9:7]=3'b011
|
||||
+ * su_trim[31:24], CKDRV adjust
|
||||
+ */
|
||||
+ writel(0x90, priv->mmio + PHYREG11);
|
||||
+ writel(0x02, priv->mmio + PHYREG12);
|
||||
+ writel(0x57, priv->mmio + PHYREG14);
|
||||
+
|
||||
+ writel(PHYREG16_SSC_CNT_VALUE, priv->mmio + PHYREG16);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case REF_CLOCK_25MHz:
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_25m, true);
|
||||
+ break;
|
||||
+
|
||||
+ case REF_CLOCK_100MHz:
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_100m, true);
|
||||
+ if (priv->type == PHY_TYPE_PCIE) {
|
||||
+ /* gate_tx_pck_sel length select work for L1SS */
|
||||
+ writel(0xc0, priv->mmio + PHYREG30);
|
||||
+
|
||||
+ /* PLL KVCO tuning fine */
|
||||
+ val = FIELD_PREP(PHYREG33_PLL_KVCO_MASK, PHYREG33_PLL_KVCO_VALUE_RK3576);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK,
|
||||
+ val, PHYREG33);
|
||||
+
|
||||
+ /* Set up rx_trim: PLL LPF C1 85pf R1 1.25kohm */
|
||||
+ writel(0x4c, priv->mmio + PHYREG27);
|
||||
+
|
||||
+ /*
|
||||
+ * Set up SU adjust signal:
|
||||
+ * su_trim[7:0], PLL KVCO adjust bits[2:0] to min
|
||||
+ * su_trim[15:8], bypass PLL loop divider code, and
|
||||
+ * PLL LPF R1 adujst bits[9:7]=3'b101
|
||||
+ * su_trim[23:16], CKRCV adjust
|
||||
+ * su_trim[31:24], CKDRV adjust
|
||||
+ */
|
||||
+ writel(0x90, priv->mmio + PHYREG11);
|
||||
+ writel(0x43, priv->mmio + PHYREG12);
|
||||
+ writel(0x88, priv->mmio + PHYREG13);
|
||||
+ writel(0x56, priv->mmio + PHYREG14);
|
||||
+ } else if (priv->type == PHY_TYPE_SATA) {
|
||||
+ /* downward spread spectrum +500ppm */
|
||||
+ val = FIELD_PREP(PHYREG32_SSC_DIR_MASK, PHYREG32_SSC_DOWNWARD);
|
||||
+ val |= FIELD_PREP(PHYREG32_SSC_OFFSET_MASK, PHYREG32_SSC_OFFSET_500PPM);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG32_SSC_MASK, val, PHYREG32);
|
||||
+
|
||||
+ /* ssc ppm adjust to 3500ppm */
|
||||
+ rockchip_combphy_updatel(priv, PHYREG10_SSC_PCM_MASK,
|
||||
+ PHYREG10_SSC_PCM_3500PPM,
|
||||
+ PHYREG10);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(priv->dev, "Unsupported rate: %lu\n", rate);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (priv->ext_refclk) {
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_ext, true);
|
||||
+ if (priv->type == PHY_TYPE_PCIE && rate == REF_CLOCK_100MHz) {
|
||||
+ val = FIELD_PREP(PHYREG33_PLL_KVCO_MASK, PHYREG33_PLL_KVCO_VALUE_RK3576);
|
||||
+ rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK,
|
||||
+ val, PHYREG33);
|
||||
+
|
||||
+ /* Set up rx_trim: PLL LPF C1 85pf R1 2.5kohm */
|
||||
+ writel(0x0c, priv->mmio + PHYREG27);
|
||||
+
|
||||
+ /*
|
||||
+ * Set up SU adjust signal:
|
||||
+ * su_trim[7:0], PLL KVCO adjust bits[2:0] to min
|
||||
+ * su_trim[15:8], bypass PLL loop divider code, and
|
||||
+ * PLL LPF R1 adujst bits[9:7]=3'b101.
|
||||
+ * su_trim[23:16], CKRCV adjust
|
||||
+ * su_trim[31:24], CKDRV adjust
|
||||
+ */
|
||||
+ writel(0x90, priv->mmio + PHYREG11);
|
||||
+ writel(0x43, priv->mmio + PHYREG12);
|
||||
+ writel(0x88, priv->mmio + PHYREG13);
|
||||
+ writel(0x56, priv->mmio + PHYREG14);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (priv->enable_ssc) {
|
||||
+ val = readl(priv->mmio + PHYREG8);
|
||||
+ val |= PHYREG8_SSC_EN;
|
||||
+ writel(val, priv->mmio + PHYREG8);
|
||||
+
|
||||
+ if (priv->type == PHY_TYPE_PCIE && rate == REF_CLOCK_24MHz) {
|
||||
+ /* Set PLL loop divider */
|
||||
+ writel(0x00, priv->mmio + PHYREG17);
|
||||
+ writel(PHYREG18_PLL_LOOP, priv->mmio + PHYREG18);
|
||||
+
|
||||
+ /* Set up rx_pck invert and rx msb to disable */
|
||||
+ writel(0x00, priv->mmio + PHYREG27);
|
||||
+
|
||||
+ /*
|
||||
+ * Set up SU adjust signal:
|
||||
+ * su_trim[7:0], PLL KVCO adjust bits[2:0] to min
|
||||
+ * su_trim[15:8], PLL LPF R1 adujst bits[9:7]=3'b101
|
||||
+ * su_trim[23:16], CKRCV adjust
|
||||
+ * su_trim[31:24], CKDRV adjust
|
||||
+ */
|
||||
+ writel(0x90, priv->mmio + PHYREG11);
|
||||
+ writel(0x02, priv->mmio + PHYREG12);
|
||||
+ writel(0x08, priv->mmio + PHYREG13);
|
||||
+ writel(0x57, priv->mmio + PHYREG14);
|
||||
+ writel(0x40, priv->mmio + PHYREG15);
|
||||
+
|
||||
+ writel(PHYREG16_SSC_CNT_VALUE, priv->mmio + PHYREG16);
|
||||
+
|
||||
+ val = FIELD_PREP(PHYREG33_PLL_KVCO_MASK, PHYREG33_PLL_KVCO_VALUE_RK3576);
|
||||
+ writel(val, priv->mmio + PHYREG33);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct rockchip_combphy_grfcfg rk3576_combphy_grfcfgs = {
|
||||
+ /* pipe-phy-grf */
|
||||
+ .pcie_mode_set = { 0x0000, 5, 0, 0x00, 0x11 },
|
||||
+ .usb_mode_set = { 0x0000, 5, 0, 0x00, 0x04 },
|
||||
+ .pipe_rxterm_set = { 0x0000, 12, 12, 0x00, 0x01 },
|
||||
+ .pipe_txelec_set = { 0x0004, 1, 1, 0x00, 0x01 },
|
||||
+ .pipe_txcomp_set = { 0x0004, 4, 4, 0x00, 0x01 },
|
||||
+ .pipe_clk_24m = { 0x0004, 14, 13, 0x00, 0x00 },
|
||||
+ .pipe_clk_25m = { 0x0004, 14, 13, 0x00, 0x01 },
|
||||
+ .pipe_clk_100m = { 0x0004, 14, 13, 0x00, 0x02 },
|
||||
+ .pipe_phymode_sel = { 0x0008, 1, 1, 0x00, 0x01 },
|
||||
+ .pipe_rate_sel = { 0x0008, 2, 2, 0x00, 0x01 },
|
||||
+ .pipe_rxterm_sel = { 0x0008, 8, 8, 0x00, 0x01 },
|
||||
+ .pipe_txelec_sel = { 0x0008, 12, 12, 0x00, 0x01 },
|
||||
+ .pipe_txcomp_sel = { 0x0008, 15, 15, 0x00, 0x01 },
|
||||
+ .pipe_clk_ext = { 0x000c, 9, 8, 0x02, 0x01 },
|
||||
+ .pipe_phy_status = { 0x0034, 6, 6, 0x01, 0x00 },
|
||||
+ .con0_for_pcie = { 0x0000, 15, 0, 0x00, 0x1000 },
|
||||
+ .con1_for_pcie = { 0x0004, 15, 0, 0x00, 0x0000 },
|
||||
+ .con2_for_pcie = { 0x0008, 15, 0, 0x00, 0x0101 },
|
||||
+ .con3_for_pcie = { 0x000c, 15, 0, 0x00, 0x0200 },
|
||||
+ .con0_for_sata = { 0x0000, 15, 0, 0x00, 0x0129 },
|
||||
+ .con1_for_sata = { 0x0004, 15, 0, 0x00, 0x0000 },
|
||||
+ .con2_for_sata = { 0x0008, 15, 0, 0x00, 0x80c1 },
|
||||
+ .con3_for_sata = { 0x000c, 15, 0, 0x00, 0x0407 },
|
||||
+ /* php-grf */
|
||||
+ .pipe_con0_for_sata = { 0x001C, 2, 0, 0x00, 0x2 },
|
||||
+ .pipe_con1_for_sata = { 0x0020, 2, 0, 0x00, 0x2 },
|
||||
+};
|
||||
+
|
||||
+static const struct rockchip_combphy_cfg rk3576_combphy_cfgs = {
|
||||
+ .num_phys = 2,
|
||||
+ .phy_ids = {
|
||||
+ 0x2b050000,
|
||||
+ 0x2b060000
|
||||
+ },
|
||||
+ .grfcfg = &rk3576_combphy_grfcfgs,
|
||||
+ .combphy_cfg = rk3576_combphy_cfg,
|
||||
+};
|
||||
+
|
||||
static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv)
|
||||
{
|
||||
const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
|
||||
@@ -776,6 +1051,10 @@ static const struct of_device_id rockchi
|
||||
.data = &rk3568_combphy_cfgs,
|
||||
},
|
||||
{
|
||||
+ .compatible = "rockchip,rk3576-naneng-combphy",
|
||||
+ .data = &rk3576_combphy_cfgs,
|
||||
+ },
|
||||
+ {
|
||||
.compatible = "rockchip,rk3588-naneng-combphy",
|
||||
.data = &rk3588_combphy_cfgs,
|
||||
},
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
From 3b7eb946b1d640d684a921e53e1e50985ab7eb89 Mon Sep 17 00:00:00 2001
|
||||
From: QiuSimons <45143996+QiuSimons@users.noreply.github.com>
|
||||
Date: Tue, 4 Aug 2020 20:17:53 +0800
|
||||
Subject: [PATCH] rockchip: rk3328: add i2c0 controller for nanopi r2s
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 4 ++++
|
||||
1 files changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -176,6 +176,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
+442
@@ -0,0 +1,442 @@
|
||||
From 0f989817a4c1d2c3d196d550ff05cda98bc91324 Mon Sep 17 00:00:00 2001
|
||||
From: Julian Pidancet <julian@pidancet.net>
|
||||
Date: Sun, 23 Jan 2022 16:34:08 +0100
|
||||
Subject: [PATCH v2] rockchip: rk3328: add support for FriendlyARM NanoPi NEO3
|
||||
|
||||
This patch adds support for FriendlyARM NanoPi NEO3
|
||||
|
||||
Soc: RockChip RK3328
|
||||
RAM: 1GB/2GB DDR4
|
||||
LAN: 10/100/1000M Ethernet with unique MAC
|
||||
USB Host: 1x USB3.0 Type A and 2x USB2.0 on 2.54mm pin header
|
||||
MicroSD: x 1 for system boot and storage
|
||||
LED: Power LED x 1, System LED x 1
|
||||
Key: User Button x 1
|
||||
Fan: 2 Pin JST ZH 1.5mm Connector for 5V Fan
|
||||
GPIO: 26 pin-header, include I2C, UART, SPI, I2S, GPIO
|
||||
Power: 5V/1A, via Type-C or GPIO
|
||||
|
||||
Signed-off-by: Julian Pidancet <julian@pidancet.net>
|
||||
---
|
||||
|
||||
This is another shot at previous work submitted by Marty Jones
|
||||
<mj8263788@gmail.com> (https://lore.kernel.org/linux-arm-kernel/20201228152836.02795e09.mj8263788@gmail.com/),
|
||||
which is now a year old.
|
||||
|
||||
v2: Following up on Robin Murphy's comments, the NEO3 DTS is now
|
||||
standalone and no longer includes the nanopi R2S one. The lan_led and
|
||||
wan_len nodes have been removed, and the sys_led node has been renamed
|
||||
to status_led in accordance with the board schematics.
|
||||
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3328-nanopi-neo3.dts | 396 ++++++++++++++++++
|
||||
2 files changed, 397 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-na
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-neo3.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-neo3.dts
|
||||
@@ -0,0 +1,394 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
|
||||
+ * Copyright (c) 2022 Julian Pidancet <julian@pidancet.net>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include "rk3328.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyElec NanoPi NEO3";
|
||||
+ compatible = "friendlyarm,nanopi-neo3", "rockchip,rk3328";
|
||||
+
|
||||
+ aliases {
|
||||
+ led-boot = &status_led;
|
||||
+ led-failsafe = &status_led;
|
||||
+ led-running = &status_led;
|
||||
+ led-upgrade = &status_led;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ gmac_clk: gmac-clock {
|
||||
+ compatible = "fixed-clock";
|
||||
+ clock-frequency = <125000000>;
|
||||
+ clock-output-names = "gmac_clkin";
|
||||
+ #clock-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <50>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&status_led_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ status_led: led-0 {
|
||||
+ gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ label = "nanopi-neo3:green:status";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_sdio: sdmmcio-regulator {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-0 = <&sdio_vcc_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_io_sdio";
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-settling-time-us = <5000>;
|
||||
+ regulator-type = "voltage";
|
||||
+ startup-delay-us = <2000>;
|
||||
+ states = <1800000 0x1>,
|
||||
+ <3300000 0x0>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_sd: sdmmc-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||
+ pinctrl-0 = <&sdmmc0m1_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ regulator-name = "vcc_sd";
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc_io_33>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_5v: vdd-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_5v";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_rtl8153: vcc-rtl8153-regulator {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rtl8153_en_drv>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-name = "vcc_rtl8153";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_arm>;
|
||||
+};
|
||||
+
|
||||
+&display_subsystem {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&gmac2io {
|
||||
+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
|
||||
+ assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
|
||||
+ clock_in_out = "input";
|
||||
+ phy-handle = <&rtl8211e>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <&vcc_io_33>;
|
||||
+ pinctrl-0 = <&rgmiim1_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ rx_delay = <0x18>;
|
||||
+ snps,aal;
|
||||
+ tx_delay = <0x24>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ rtl8211e: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <50000>;
|
||||
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ rk805: pmic@18 {
|
||||
+ compatible = "rockchip,rk805";
|
||||
+ reg = <0x18>;
|
||||
+ interrupt-parent = <&gpio1>;
|
||||
+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ clock-output-names = "xin32k", "rk805-clkout2";
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ pinctrl-0 = <&pmic_int_l>;
|
||||
+ pinctrl-names = "default";
|
||||
+ rockchip,system-power-controller;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ vcc1-supply = <&vdd_5v>;
|
||||
+ vcc2-supply = <&vdd_5v>;
|
||||
+ vcc3-supply = <&vdd_5v>;
|
||||
+ vcc4-supply = <&vdd_5v>;
|
||||
+ vcc5-supply = <&vcc_io_33>;
|
||||
+ vcc6-supply = <&vdd_5v>;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_log: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_log";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_arm: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_arm";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <712500>;
|
||||
+ regulator-max-microvolt = <1450000>;
|
||||
+ regulator-ramp-delay = <12500>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <950000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_io_33: DCDC_REG4 {
|
||||
+ regulator-name = "vcc_io_33";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_18: LDO_REG1 {
|
||||
+ regulator-name = "vcc_18";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc18_emmc: LDO_REG2 {
|
||||
+ regulator-name = "vcc18_emmc";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_10: LDO_REG3 {
|
||||
+ regulator-name = "vdd_10";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <1000000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&io_domains {
|
||||
+ pmuio-supply = <&vcc_io_33>;
|
||||
+ vccio1-supply = <&vcc_io_33>;
|
||||
+ vccio2-supply = <&vcc18_emmc>;
|
||||
+ vccio3-supply = <&vcc_io_sdio>;
|
||||
+ vccio4-supply = <&vcc_18>;
|
||||
+ vccio5-supply = <&vcc_io_33>;
|
||||
+ vccio6-supply = <&vcc_io_33>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ button {
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ ethernet-phy {
|
||||
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ status_led_pin: status-led-pin {
|
||||
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int_l: pmic-int-l {
|
||||
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sd {
|
||||
+ sdio_vcc_pin: sdio-vcc-pin {
|
||||
+ rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ rtl8153_en_drv: rtl8153-en-drv {
|
||||
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc {
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
|
||||
+ pinctrl-names = "default";
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-sdr104;
|
||||
+ vmmc-supply = <&vcc_sd>;
|
||||
+ vqmmc-supply = <&vcc_io_sdio>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ rockchip,hw-tshut-mode = <0>;
|
||||
+ rockchip,hw-tshut-polarity = <0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_host {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb20_otg {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ehci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_ohci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdrd3 {
|
||||
+ dr_mode = "host";
|
||||
+ status = "okay";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usb-eth@2 {
|
||||
+ compatible = "realtek,rtl8153";
|
||||
+ reg = <2>;
|
||||
+
|
||||
+ realtek,led-data = <0x87>;
|
||||
+ };
|
||||
+};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -45,6 +45,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gr
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-dumo.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-guangmiao-g4c.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4se.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-hugsun-x99.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-khadas-edge-captain.dtb
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
|
||||
@@ -264,6 +264,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY0>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf0>;
|
||||
#phy-cells = <1>;
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -1775,6 +1775,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY1_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY1>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf1>;
|
||||
#phy-cells = <1>;
|
||||
@@ -1791,6 +1792,7 @@
|
||||
assigned-clocks = <&pmucru CLK_PCIEPHY2_REF>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
resets = <&cru SRST_PIPEPHY2>;
|
||||
+ reset-names = "phy";
|
||||
rockchip,pipe-grf = <&pipegrf>;
|
||||
rockchip,pipe-phy-grf = <&pipe_phy_grf2>;
|
||||
#phy-cells = <1>;
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
@@ -324,7 +324,7 @@ static int rockchip_combphy_parse_dt(str
|
||||
|
||||
priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk");
|
||||
|
||||
- priv->phy_rst = devm_reset_control_array_get_exclusive(dev);
|
||||
+ priv->phy_rst = devm_reset_control_get(dev, "phy");
|
||||
if (IS_ERR(priv->phy_rst))
|
||||
return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");
|
||||
|
||||
+269
@@ -0,0 +1,269 @@
|
||||
From ee5af82a6f88fd28849ea6d98cf43fbe9cbbbb19 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Liu <steven.liu@rock-chips.com>
|
||||
Date: Thu, 11 Aug 2022 15:15:28 +0800
|
||||
Subject: [PATCH] pinctrl: rockchip: add rk3528 support
|
||||
|
||||
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
|
||||
Change-Id: I2c1d32907168caf8a8afee6d1f742795b3d13536
|
||||
---
|
||||
drivers/pinctrl/pinctrl-rockchip.c | 196 ++++++++++++++++++++++++++++-
|
||||
drivers/pinctrl/pinctrl-rockchip.h | 1 +
|
||||
2 files changed, 196 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/pinctrl/pinctrl-rockchip.c
|
||||
+++ b/drivers/pinctrl/pinctrl-rockchip.c
|
||||
@@ -2036,6 +2036,150 @@ static int rk3568_calc_pull_reg_and_bit(
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#define RK3528_DRV_BITS_PER_PIN 8
|
||||
+#define RK3528_DRV_PINS_PER_REG 2
|
||||
+#define RK3528_DRV_GPIO0_OFFSET 0x100
|
||||
+#define RK3528_DRV_GPIO1_OFFSET 0x20120
|
||||
+#define RK3528_DRV_GPIO2_OFFSET 0x30160
|
||||
+#define RK3528_DRV_GPIO3_OFFSET 0x20190
|
||||
+#define RK3528_DRV_GPIO4_OFFSET 0x101C0
|
||||
+
|
||||
+static int rk3528_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl *info = bank->drvdata;
|
||||
+
|
||||
+ *regmap = info->regmap_base;
|
||||
+ switch (bank->bank_num) {
|
||||
+ case 0:
|
||||
+ *reg = RK3528_DRV_GPIO0_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 1:
|
||||
+ *reg = RK3528_DRV_GPIO1_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 2:
|
||||
+ *reg = RK3528_DRV_GPIO2_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 3:
|
||||
+ *reg = RK3528_DRV_GPIO3_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 4:
|
||||
+ *reg = RK3528_DRV_GPIO4_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(info->dev, "unsupported bank_num %d\n", bank->bank_num);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3528_DRV_PINS_PER_REG) * 4);
|
||||
+ *bit = pin_num % RK3528_DRV_PINS_PER_REG;
|
||||
+ *bit *= RK3528_DRV_BITS_PER_PIN;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define RK3528_PULL_BITS_PER_PIN 2
|
||||
+#define RK3528_PULL_PINS_PER_REG 8
|
||||
+#define RK3528_PULL_GPIO0_OFFSET 0x200
|
||||
+#define RK3528_PULL_GPIO1_OFFSET 0x20210
|
||||
+#define RK3528_PULL_GPIO2_OFFSET 0x30220
|
||||
+#define RK3528_PULL_GPIO3_OFFSET 0x20230
|
||||
+#define RK3528_PULL_GPIO4_OFFSET 0x10240
|
||||
+
|
||||
+static int rk3528_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num, struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl *info = bank->drvdata;
|
||||
+
|
||||
+ *regmap = info->regmap_base;
|
||||
+ switch (bank->bank_num) {
|
||||
+ case 0:
|
||||
+ *reg = RK3528_PULL_GPIO0_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 1:
|
||||
+ *reg = RK3528_PULL_GPIO1_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 2:
|
||||
+ *reg = RK3528_PULL_GPIO2_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 3:
|
||||
+ *reg = RK3528_PULL_GPIO3_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 4:
|
||||
+ *reg = RK3528_PULL_GPIO4_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(info->dev, "unsupported bank_num %d\n", bank->bank_num);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3528_PULL_PINS_PER_REG) * 4);
|
||||
+ *bit = pin_num % RK3528_PULL_PINS_PER_REG;
|
||||
+ *bit *= RK3528_PULL_BITS_PER_PIN;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define RK3528_SMT_BITS_PER_PIN 1
|
||||
+#define RK3528_SMT_PINS_PER_REG 8
|
||||
+#define RK3528_SMT_GPIO0_OFFSET 0x400
|
||||
+#define RK3528_SMT_GPIO1_OFFSET 0x20410
|
||||
+#define RK3528_SMT_GPIO2_OFFSET 0x30420
|
||||
+#define RK3528_SMT_GPIO3_OFFSET 0x20430
|
||||
+#define RK3528_SMT_GPIO4_OFFSET 0x10440
|
||||
+
|
||||
+static int rk3528_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank,
|
||||
+ int pin_num,
|
||||
+ struct regmap **regmap,
|
||||
+ int *reg, u8 *bit)
|
||||
+{
|
||||
+ struct rockchip_pinctrl *info = bank->drvdata;
|
||||
+
|
||||
+ *regmap = info->regmap_base;
|
||||
+ switch (bank->bank_num) {
|
||||
+ case 0:
|
||||
+ *reg = RK3528_SMT_GPIO0_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 1:
|
||||
+ *reg = RK3528_SMT_GPIO1_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 2:
|
||||
+ *reg = RK3528_SMT_GPIO2_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 3:
|
||||
+ *reg = RK3528_SMT_GPIO3_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ case 4:
|
||||
+ *reg = RK3528_SMT_GPIO4_OFFSET;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(info->dev, "unsupported bank_num %d\n", bank->bank_num);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ *reg += ((pin_num / RK3528_SMT_PINS_PER_REG) * 4);
|
||||
+ *bit = pin_num % RK3528_SMT_PINS_PER_REG;
|
||||
+ *bit *= RK3528_SMT_BITS_PER_PIN;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
#define RK3568_DRV_PMU_OFFSET 0x70
|
||||
#define RK3568_DRV_GRF_OFFSET 0x200
|
||||
#define RK3568_DRV_BITS_PER_PIN 8
|
||||
@@ -2495,6 +2639,10 @@ static int rockchip_set_drive_perpin(str
|
||||
rmask_bits = RK3588_DRV_BITS_PER_PIN;
|
||||
ret = strength;
|
||||
goto config;
|
||||
+ } else if (ctrl->type == RK3528) {
|
||||
+ rmask_bits = RK3528_DRV_BITS_PER_PIN;
|
||||
+ ret = (1 << (strength + 1)) - 1;
|
||||
+ goto config;
|
||||
} else if (ctrl->type == RK3568) {
|
||||
rmask_bits = RK3568_DRV_BITS_PER_PIN;
|
||||
ret = (1 << (strength + 1)) - 1;
|
||||
@@ -2639,6 +2787,7 @@ static int rockchip_get_pull(struct rock
|
||||
case RK3328:
|
||||
case RK3368:
|
||||
case RK3399:
|
||||
+ case RK3528:
|
||||
case RK3568:
|
||||
case RK3576:
|
||||
case RK3588:
|
||||
@@ -2699,6 +2848,7 @@ static int rockchip_set_pull(struct rock
|
||||
case RK3328:
|
||||
case RK3368:
|
||||
case RK3399:
|
||||
+ case RK3528:
|
||||
case RK3568:
|
||||
case RK3576:
|
||||
case RK3588:
|
||||
@@ -2965,6 +3115,7 @@ static bool rockchip_pinconf_pull_valid(
|
||||
case RK3328:
|
||||
case RK3368:
|
||||
case RK3399:
|
||||
+ case RK3528:
|
||||
case RK3568:
|
||||
case RK3576:
|
||||
case RK3588:
|
||||
@@ -4084,6 +4235,49 @@ static struct rockchip_pin_ctrl rk3399_p
|
||||
.drv_calc_reg = rk3399_calc_drv_reg_and_bit,
|
||||
};
|
||||
|
||||
+static struct rockchip_pin_bank rk3528_pin_banks[] = {
|
||||
+ PIN_BANK_IOMUX_FLAGS_OFFSET(0, 32, "gpio0",
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ 0, 0, 0, 0),
|
||||
+ PIN_BANK_IOMUX_FLAGS_OFFSET(1, 32, "gpio1",
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ 0x20020, 0x20028, 0x20030, 0x20038),
|
||||
+ PIN_BANK_IOMUX_FLAGS_OFFSET(2, 32, "gpio2",
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ 0x30040, 0, 0, 0),
|
||||
+ PIN_BANK_IOMUX_FLAGS_OFFSET(3, 32, "gpio3",
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ 0x20060, 0x20068, 0x20070, 0),
|
||||
+ PIN_BANK_IOMUX_FLAGS_OFFSET(4, 32, "gpio4",
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ IOMUX_WIDTH_4BIT,
|
||||
+ 0x10080, 0x10088, 0x10090, 0x10098),
|
||||
+};
|
||||
+
|
||||
+static struct rockchip_pin_ctrl rk3528_pin_ctrl __maybe_unused = {
|
||||
+ .pin_banks = rk3528_pin_banks,
|
||||
+ .nr_banks = ARRAY_SIZE(rk3528_pin_banks),
|
||||
+ .label = "RK3528-GPIO",
|
||||
+ .type = RK3528,
|
||||
+ .pull_calc_reg = rk3528_calc_pull_reg_and_bit,
|
||||
+ .drv_calc_reg = rk3528_calc_drv_reg_and_bit,
|
||||
+ .schmitt_calc_reg = rk3528_calc_schmitt_reg_and_bit,
|
||||
+};
|
||||
+
|
||||
static struct rockchip_pin_bank rk3568_pin_banks[] = {
|
||||
PIN_BANK_IOMUX_FLAGS(0, 32, "gpio0", IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT,
|
||||
IOMUX_SOURCE_PMU | IOMUX_WIDTH_4BIT,
|
||||
@@ -4208,6 +4402,8 @@ static const struct of_device_id rockchi
|
||||
.data = &rk3368_pin_ctrl },
|
||||
{ .compatible = "rockchip,rk3399-pinctrl",
|
||||
.data = &rk3399_pin_ctrl },
|
||||
+ { .compatible = "rockchip,rk3528-pinctrl",
|
||||
+ .data = &rk3528_pin_ctrl },
|
||||
{ .compatible = "rockchip,rk3568-pinctrl",
|
||||
.data = &rk3568_pin_ctrl },
|
||||
{ .compatible = "rockchip,rk3576-pinctrl",
|
||||
--- a/drivers/pinctrl/pinctrl-rockchip.h
|
||||
+++ b/drivers/pinctrl/pinctrl-rockchip.h
|
||||
@@ -196,6 +196,7 @@ enum rockchip_pinctrl_type {
|
||||
RK3328,
|
||||
RK3368,
|
||||
RK3399,
|
||||
+ RK3528,
|
||||
RK3568,
|
||||
RK3576,
|
||||
RK3588,
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
From 1e244fb37e21ce92a32b203cb030510bc3b42d29 Mon Sep 17 00:00:00 2001
|
||||
From: Shaohan Yao <shaohan.yao@rock-chips.com>
|
||||
Date: Fri, 9 Sep 2022 14:34:08 +0800
|
||||
Subject: [PATCH] thermal: rockchip: Support the rk3528 SoC in thermal driver
|
||||
|
||||
There are one Temperature Sensor on rk3528, channel 0 is for chip.
|
||||
|
||||
Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
|
||||
Change-Id: Ib5bbb81615fe9fab80f26cdd2098cfb56746ca15
|
||||
---
|
||||
drivers/thermal/rockchip_thermal.c | 107 +++++++++++++++++++++++++++++
|
||||
1 file changed, 107 insertions(+)
|
||||
|
||||
--- a/drivers/thermal/rockchip_thermal.c
|
||||
+++ b/drivers/thermal/rockchip_thermal.c
|
||||
@@ -185,6 +185,8 @@ struct rockchip_thermal_data {
|
||||
#define TSADCV2_AUTO_PERIOD_HT 0x6c
|
||||
#define TSADCV3_AUTO_PERIOD 0x154
|
||||
#define TSADCV3_AUTO_PERIOD_HT 0x158
|
||||
+#define TSADCV9_Q_MAX 0x210
|
||||
+#define TSADCV9_FLOW_CON 0x218
|
||||
|
||||
#define TSADCV2_AUTO_EN BIT(0)
|
||||
#define TSADCV2_AUTO_EN_MASK BIT(16)
|
||||
@@ -195,6 +197,7 @@ struct rockchip_thermal_data {
|
||||
#define TSADCV2_AUTO_TSHUT_POLARITY_MASK BIT(24)
|
||||
|
||||
#define TSADCV3_AUTO_Q_SEL_EN BIT(1)
|
||||
+#define TSADCV3_AUTO_Q_SEL_EN_MASK BIT(17)
|
||||
|
||||
#define TSADCV2_INT_SRC_EN(chn) BIT(chn)
|
||||
#define TSADCV2_INT_SRC_EN_MASK(chn) BIT(16 + (chn))
|
||||
@@ -208,9 +211,12 @@ struct rockchip_thermal_data {
|
||||
#define TSADCV2_DATA_MASK 0xfff
|
||||
#define TSADCV3_DATA_MASK 0x3ff
|
||||
#define TSADCV4_DATA_MASK 0x1ff
|
||||
+#define TSADCV5_DATA_MASK 0x7ff
|
||||
|
||||
#define TSADCV2_HIGHT_INT_DEBOUNCE_COUNT 4
|
||||
#define TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT 4
|
||||
+#define TSADCV3_HIGHT_INT_DEBOUNCE 0x14c
|
||||
+#define TSADCV3_HIGHT_TSHUT_DEBOUNCE 0x150
|
||||
#define TSADCV2_AUTO_PERIOD_TIME 250 /* 250ms */
|
||||
#define TSADCV2_AUTO_PERIOD_HT_TIME 50 /* 50ms */
|
||||
#define TSADCV3_AUTO_PERIOD_TIME 1875 /* 2.5ms */
|
||||
@@ -220,6 +226,9 @@ struct rockchip_thermal_data {
|
||||
#define TSADCV5_AUTO_PERIOD_HT_TIME 1622 /* 2.5ms */
|
||||
#define TSADCV6_AUTO_PERIOD_TIME 5000 /* 2.5ms */
|
||||
#define TSADCV6_AUTO_PERIOD_HT_TIME 5000 /* 2.5ms */
|
||||
+#define TSADCV7_AUTO_PERIOD_TIME 3000 /* 2.5ms */
|
||||
+#define TSADCV7_AUTO_PERIOD_HT_TIME 3000 /* 2.5ms */
|
||||
+#define TSADCV3_Q_MAX_VAL 0x7ff /* 11bit 2047 */
|
||||
|
||||
#define TSADCV2_USER_INTER_PD_SOC 0x340 /* 13 clocks */
|
||||
#define TSADCV5_USER_INTER_PD_SOC 0xfc0 /* 97us, at least 90us */
|
||||
@@ -230,6 +239,8 @@ struct rockchip_thermal_data {
|
||||
|
||||
#define PX30_GRF_SOC_CON2 0x0408
|
||||
|
||||
+#define RK3528_GRF_TSADC_CON 0x40030
|
||||
+
|
||||
#define RK3568_GRF_TSADC_CON 0x0600
|
||||
#define RK3568_GRF_TSADC_ANA_REG0 (0x10001 << 0)
|
||||
#define RK3568_GRF_TSADC_ANA_REG1 (0x10001 << 1)
|
||||
@@ -497,6 +508,45 @@ static const struct tsadc_table rk3399_c
|
||||
{TSADCV3_DATA_MASK, 125000},
|
||||
};
|
||||
|
||||
+static const struct tsadc_table rk3528_code_table[] = {
|
||||
+ {0, -40000},
|
||||
+ {1419, -40000},
|
||||
+ {1427, -35000},
|
||||
+ {1435, -30000},
|
||||
+ {1443, -25000},
|
||||
+ {1452, -20000},
|
||||
+ {1460, -15000},
|
||||
+ {1468, -10000},
|
||||
+ {1477, -5000},
|
||||
+ {1486, 0},
|
||||
+ {1494, 5000},
|
||||
+ {1502, 10000},
|
||||
+ {1510, 15000},
|
||||
+ {1519, 20000},
|
||||
+ {1527, 25000},
|
||||
+ {1535, 30000},
|
||||
+ {1544, 35000},
|
||||
+ {1552, 40000},
|
||||
+ {1561, 45000},
|
||||
+ {1569, 50000},
|
||||
+ {1578, 55000},
|
||||
+ {1586, 60000},
|
||||
+ {1594, 65000},
|
||||
+ {1603, 70000},
|
||||
+ {1612, 75000},
|
||||
+ {1620, 80000},
|
||||
+ {1628, 85000},
|
||||
+ {1637, 90000},
|
||||
+ {1646, 95000},
|
||||
+ {1654, 100000},
|
||||
+ {1662, 105000},
|
||||
+ {1671, 110000},
|
||||
+ {1679, 115000},
|
||||
+ {1688, 120000},
|
||||
+ {1696, 125000},
|
||||
+ {TSADCV5_DATA_MASK, 125000},
|
||||
+};
|
||||
+
|
||||
static const struct tsadc_table rk3568_code_table[] = {
|
||||
{0, -40000},
|
||||
{1584, -40000},
|
||||
@@ -834,6 +884,37 @@ static void rk_tsadcv8_initialize(struct
|
||||
regs + TSADCV2_AUTO_CON);
|
||||
}
|
||||
|
||||
+static void rk_tsadcv11_initialize(struct regmap *grf, void __iomem *regs,
|
||||
+ enum tshut_polarity tshut_polarity)
|
||||
+{
|
||||
+ writel_relaxed(TSADCV7_AUTO_PERIOD_TIME, regs + TSADCV3_AUTO_PERIOD);
|
||||
+ writel_relaxed(TSADCV7_AUTO_PERIOD_HT_TIME,
|
||||
+ regs + TSADCV3_AUTO_PERIOD_HT);
|
||||
+ writel_relaxed(TSADCV2_HIGHT_INT_DEBOUNCE_COUNT,
|
||||
+ regs + TSADCV3_HIGHT_INT_DEBOUNCE);
|
||||
+ writel_relaxed(TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT,
|
||||
+ regs + TSADCV3_HIGHT_TSHUT_DEBOUNCE);
|
||||
+ writel_relaxed(TSADCV3_Q_MAX_VAL, regs + TSADCV9_Q_MAX);
|
||||
+ writel_relaxed(TSADCV3_AUTO_Q_SEL_EN | TSADCV3_AUTO_Q_SEL_EN_MASK,
|
||||
+ regs + TSADCV2_AUTO_CON);
|
||||
+ if (tshut_polarity == TSHUT_HIGH_ACTIVE)
|
||||
+ writel_relaxed(TSADCV2_AUTO_TSHUT_POLARITY_HIGH |
|
||||
+ TSADCV2_AUTO_TSHUT_POLARITY_MASK,
|
||||
+ regs + TSADCV2_AUTO_CON);
|
||||
+ else
|
||||
+ writel_relaxed(TSADCV2_AUTO_TSHUT_POLARITY_MASK,
|
||||
+ regs + TSADCV2_AUTO_CON);
|
||||
+
|
||||
+ if (!IS_ERR(grf)) {
|
||||
+ regmap_write(grf, RK3528_GRF_TSADC_CON, RK3568_GRF_TSADC_TSEN);
|
||||
+ udelay(15);
|
||||
+ regmap_write(grf, RK3528_GRF_TSADC_CON, RK3568_GRF_TSADC_ANA_REG0);
|
||||
+ regmap_write(grf, RK3528_GRF_TSADC_CON, RK3568_GRF_TSADC_ANA_REG1);
|
||||
+ regmap_write(grf, RK3528_GRF_TSADC_CON, RK3568_GRF_TSADC_ANA_REG2);
|
||||
+ usleep_range(100, 200);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void rk_tsadcv2_irq_ack(void __iomem *regs)
|
||||
{
|
||||
u32 val;
|
||||
@@ -1258,6 +1339,31 @@ static const struct rockchip_tsadc_chip
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct rockchip_tsadc_chip rk3528_tsadc_data = {
|
||||
+ /* cpu, gpu */
|
||||
+ .chn_offset = 0,
|
||||
+ .chn_num = 1, /* one 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_tsadcv11_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_tsadcv3_tshut_mode,
|
||||
+
|
||||
+ .table = {
|
||||
+ .id = rk3528_code_table,
|
||||
+ .length = ARRAY_SIZE(rk3528_code_table),
|
||||
+ .data_mask = TSADCV2_DATA_MASK,
|
||||
+ .mode = ADC_INCREMENT,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct rockchip_tsadc_chip rk3568_tsadc_data = {
|
||||
/* cpu, gpu */
|
||||
.chn_offset = 0,
|
||||
@@ -1338,6 +1444,10 @@ static const struct of_device_id of_rock
|
||||
.data = (void *)&rk3399_tsadc_data,
|
||||
},
|
||||
{
|
||||
+ .compatible = "rockchip,rk3528-tsadc",
|
||||
+ .data = (void *)&rk3528_tsadc_data,
|
||||
+ },
|
||||
+ {
|
||||
.compatible = "rockchip,rk3568-tsadc",
|
||||
.data = (void *)&rk3568_tsadc_data,
|
||||
},
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
From 54d4b6b3014f3122a2235533e6511b0d6ca2cd45 Mon Sep 17 00:00:00 2001
|
||||
From: Finley Xiao <finley.xiao@rock-chips.com>
|
||||
Date: Wed, 12 Oct 2022 19:25:38 +0800
|
||||
Subject: [PATCH] soc: rockchip: power-domain: Add always on configuration for
|
||||
power domain
|
||||
|
||||
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
||||
Change-Id: Ic57f7f3a564f7d71b680e3c435d0460474b5a4a0
|
||||
---
|
||||
drivers/pmdomain/rockchip/pm-domains.c | 41 +++++++++++++++++++++++--------
|
||||
1 file changed, 31 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/pmdomain/rockchip/pm-domains.c
|
||||
+++ b/drivers/pmdomain/rockchip/pm-domains.c
|
||||
@@ -49,6 +49,7 @@ struct rockchip_domain_info {
|
||||
int clk_ungate_mask;
|
||||
int mem_status_mask;
|
||||
int repair_status_mask;
|
||||
+ bool always_on;
|
||||
u32 pwr_offset;
|
||||
u32 mem_offset;
|
||||
u32 req_offset;
|
||||
@@ -662,6 +663,26 @@ static void rockchip_pd_detach_dev(struc
|
||||
pm_clk_destroy(dev);
|
||||
}
|
||||
|
||||
+static int rockchip_pd_add_alwasy_on_flag(struct rockchip_pm_domain *pd)
|
||||
+{
|
||||
+ int error;
|
||||
+
|
||||
+ if (pd->genpd.flags & GENPD_FLAG_ALWAYS_ON)
|
||||
+ return 0;
|
||||
+ pd->genpd.flags |= GENPD_FLAG_ALWAYS_ON;
|
||||
+ if (!rockchip_pmu_domain_is_on(pd)) {
|
||||
+ error = rockchip_pd_power(pd, true);
|
||||
+ if (error) {
|
||||
+ dev_err(pd->pmu->dev,
|
||||
+ "failed to power on domain '%s': %d\n",
|
||||
+ pd->genpd.name, error);
|
||||
+ return error;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
||||
struct device_node *node)
|
||||
{
|
||||
@@ -779,6 +800,11 @@ static int rockchip_pm_add_one_domain(st
|
||||
pd->genpd.flags = GENPD_FLAG_PM_CLK;
|
||||
if (pd_info->active_wakeup)
|
||||
pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
|
||||
+ if (pd_info->always_on) {
|
||||
+ error = rockchip_pd_add_alwasy_on_flag(pd);
|
||||
+ if (error)
|
||||
+ goto err_unprepare_clocks;
|
||||
+ }
|
||||
pm_genpd_init(&pd->genpd, NULL,
|
||||
!rockchip_pmu_domain_is_on(pd) ||
|
||||
(pd->info->mem_status_mask && !rockchip_pmu_domain_is_mem_on(pd)));
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
From 2ed777fcd035089bd7996bfa09c023521ecf0e24 Mon Sep 17 00:00:00 2001
|
||||
From: Finley Xiao <finley.xiao@rock-chips.com>
|
||||
Date: Fri, 30 Sep 2022 20:11:50 +0800
|
||||
Subject: [PATCH] soc: rockchip: power-domain: add power domain support for
|
||||
rk3528
|
||||
|
||||
This driver is modified to support RK3528 SoCs.
|
||||
|
||||
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
|
||||
Change-Id: If024916eb7b52ec86ff7533aedefc1bda457b612
|
||||
---
|
||||
drivers/pmdomain/rockchip/pm-domains.c | 47 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
|
||||
--- a/drivers/pmdomain/rockchip/pm-domains.c
|
||||
+++ b/drivers/pmdomain/rockchip/pm-domains.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <dt-bindings/power/rk3366-power.h>
|
||||
#include <dt-bindings/power/rk3368-power.h>
|
||||
#include <dt-bindings/power/rk3399-power.h>
|
||||
+#include <dt-bindings/power/rk3528-power.h>
|
||||
#include <dt-bindings/power/rk3568-power.h>
|
||||
#include <dt-bindings/power/rockchip,rk3576-power.h>
|
||||
#include <dt-bindings/power/rk3588-power.h>
|
||||
@@ -130,6 +131,20 @@ struct rockchip_pmu {
|
||||
.active_wakeup = wakeup, \
|
||||
}
|
||||
|
||||
+#define DOMAIN_M_A(_name, pwr, status, req, idle, ack, always, wakeup) \
|
||||
+{ \
|
||||
+ .name = _name, \
|
||||
+ .pwr_w_mask = (pwr) << 16, \
|
||||
+ .pwr_mask = (pwr), \
|
||||
+ .status_mask = (status), \
|
||||
+ .req_w_mask = (req) << 16, \
|
||||
+ .req_mask = (req), \
|
||||
+ .idle_mask = (idle), \
|
||||
+ .ack_mask = (ack), \
|
||||
+ .always_on = always, \
|
||||
+ .active_wakeup = wakeup, \
|
||||
+}
|
||||
+
|
||||
#define DOMAIN_M_O_R(_name, p_offset, pwr, status, m_offset, m_status, r_status, r_offset, req, idle, ack, wakeup) \
|
||||
{ \
|
||||
.name = _name, \
|
||||
@@ -195,6 +210,9 @@ struct rockchip_pmu {
|
||||
#define DOMAIN_RK3399(name, pwr, status, req, wakeup) \
|
||||
DOMAIN(name, pwr, status, req, req, req, wakeup)
|
||||
|
||||
+#define DOMAIN_RK3528(name, pwr, req, always, wakeup) \
|
||||
+ DOMAIN_M_A(name, pwr, pwr, req, req, req, always, wakeup)
|
||||
+
|
||||
#define DOMAIN_RK3568(name, pwr, req, wakeup) \
|
||||
DOMAIN_M(name, pwr, pwr, req, req, req, wakeup)
|
||||
|
||||
@@ -1156,6 +1174,18 @@ static const struct rockchip_domain_info
|
||||
[RK3399_PD_SDIOAUDIO] = DOMAIN_RK3399("sdioaudio", BIT(31), BIT(31), BIT(29), true),
|
||||
};
|
||||
|
||||
+static const struct rockchip_domain_info rk3528_pm_domains[] = {
|
||||
+ [RK3528_PD_PMU] = DOMAIN_RK3528("pmu", 0, BIT(0), true, false),
|
||||
+ [RK3528_PD_BUS] = DOMAIN_RK3528("bus", 0, BIT(1), true, false),
|
||||
+ [RK3528_PD_DDR] = DOMAIN_RK3528("ddr", 0, BIT(2), true, false),
|
||||
+ [RK3528_PD_MSCH] = DOMAIN_RK3528("msch", 0, BIT(3), true, false),
|
||||
+ [RK3528_PD_GPU] = DOMAIN_RK3528("gpu", BIT(0), BIT(4), true, false),
|
||||
+ [RK3528_PD_RKVDEC] = DOMAIN_RK3528("vdec", 0, BIT(5), true, false),
|
||||
+ [RK3528_PD_RKVENC] = DOMAIN_RK3528("venc", 0, BIT(6), true, false),
|
||||
+ [RK3528_PD_VO] = DOMAIN_RK3528("vo", 0, BIT(7), true, false),
|
||||
+ [RK3528_PD_VPU] = DOMAIN_RK3528("vpu", 0, BIT(8), true, false),
|
||||
+};
|
||||
+
|
||||
static const struct rockchip_domain_info rk3568_pm_domains[] = {
|
||||
[RK3568_PD_NPU] = DOMAIN_RK3568("npu", BIT(1), BIT(2), false),
|
||||
[RK3568_PD_GPU] = DOMAIN_RK3568("gpu", BIT(0), BIT(1), false),
|
||||
@@ -1357,6 +1387,17 @@ static const struct rockchip_pmu_info rk
|
||||
.domain_info = rk3399_pm_domains,
|
||||
};
|
||||
|
||||
+static const struct rockchip_pmu_info rk3528_pmu = {
|
||||
+ .pwr_offset = 0x1210,
|
||||
+ .status_offset = 0x1230,
|
||||
+ .req_offset = 0x1110,
|
||||
+ .idle_offset = 0x1128,
|
||||
+ .ack_offset = 0x1120,
|
||||
+
|
||||
+ .num_domains = ARRAY_SIZE(rk3528_pm_domains),
|
||||
+ .domain_info = rk3528_pm_domains,
|
||||
+};
|
||||
+
|
||||
static const struct rockchip_pmu_info rk3568_pmu = {
|
||||
.pwr_offset = 0xa0,
|
||||
.status_offset = 0x98,
|
||||
@@ -1456,6 +1497,10 @@ static const struct of_device_id rockchi
|
||||
.data = (void *)&rk3399_pmu,
|
||||
},
|
||||
{
|
||||
+ .compatible = "rockchip,rk3528-power-controller",
|
||||
+ .data = (void *)&rk3528_pmu,
|
||||
+ },
|
||||
+ {
|
||||
.compatible = "rockchip,rk3568-power-controller",
|
||||
.data = (void *)&rk3568_pmu,
|
||||
},
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
From 16f512f1e10375dc48aa6c26cedeb7079aba01de Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Chen <chenjh@rock-chips.com>
|
||||
Date: Sat, 13 Aug 2022 01:15:20 +0000
|
||||
Subject: [PATCH] clk: rockchip: Add clock controller for the RK3528
|
||||
|
||||
Add the clock tree definition for the new RK3528 SoC.
|
||||
|
||||
gmac1 clocks are all controlled by GRF, but CRU helps to abstract
|
||||
these two clocks for gmac1 since the clock source is from CRU.
|
||||
|
||||
The io-in clocks are module phy output clock, gating child
|
||||
clocks by disabling phy output but not CRU gate.
|
||||
|
||||
Add gmac0 clocks.
|
||||
They are all orphans if clk_gmac0_io_i is not registered by
|
||||
GMAC driver. But it's fine that GMAC driver only get it but
|
||||
not to set/get rate.
|
||||
|
||||
Add CLK_SET_RATE_PARENT for mclk_sai_i2s0/1.
|
||||
Allowed to change parent rate.
|
||||
|
||||
Add CLK_SET_RATE_NO_REPARENT for dclk_vop0.
|
||||
dclk_vop0 is often used for HDMI, it prefers parent clock from
|
||||
clk_hdmiphy_pixel_io for better clock quality and any rate.
|
||||
It assigns clk_hdmiphy_pixel_io as parent in dts and hope not to
|
||||
change parent any more.
|
||||
|
||||
Add CLK_SET_RATE_PARENT for aclk_gpu.
|
||||
Allow aclk_gpu and aclk_gpu_mali to change parent rate.
|
||||
|
||||
Add CLK_SET_RATE_PARENT for aclk_rkvdec_pvtmux_root.
|
||||
Allow aclk_rkvdec_pvtmux_root and aclk_rkvdec to change parent rate.
|
||||
|
||||
set aclk_m_core = core_clk/2.
|
||||
aclk_m_core signoff is 550M, but we set div=2 for better
|
||||
performance.
|
||||
|
||||
Add CLK_IS_CRITICAL for clk_32k.
|
||||
Mainly for pvtpll during reboot stage.
|
||||
|
||||
Add CLK_IS_CRITICAL for all IOC clocks.
|
||||
IOC doesn't share clock with GRF. The iomux can't be changed if they
|
||||
are disabled.
|
||||
|
||||
Disable aclk_{vpu,vpu_l,vo}_root rate change
|
||||
They are all shared by multiple modules, disable rate change
|
||||
by modules.
|
||||
|
||||
Don't register clk_uart_jtag
|
||||
It's for force jtag uart delay counter. It must be open
|
||||
for box product without tf card but with uart0.
|
||||
|
||||
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
|
||||
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
|
||||
Change-Id: I09745b6a31484d6a27f04e608268d9738c1fe224
|
||||
---
|
||||
drivers/clk/rockchip/Kconfig | 7 +
|
||||
drivers/clk/rockchip/Makefile | 1 +
|
||||
drivers/clk/rockchip/clk-rk3528.c | 1187 +++++++++++++++++++++++++++++
|
||||
drivers/clk/rockchip/clk.h | 28 +
|
||||
4 files changed, 1223 insertions(+)
|
||||
create mode 100644 drivers/clk/rockchip/clk-rk3528.c
|
||||
|
||||
--- a/drivers/clk/rockchip/Kconfig
|
||||
+++ b/drivers/clk/rockchip/Kconfig
|
||||
@@ -93,6 +93,13 @@ config CLK_RK3399
|
||||
help
|
||||
Build the driver for RK3399 Clock Driver.
|
||||
|
||||
+config CLK_RK3528
|
||||
+ bool "Rockchip RK3528 clock controller support"
|
||||
+ depends on ARM64 || COMPILE_TEST
|
||||
+ default y
|
||||
+ help
|
||||
+ Build the driver for RK3528 Clock Driver.
|
||||
+
|
||||
config CLK_RK3568
|
||||
bool "Rockchip RK3568 clock controller support"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
--- a/drivers/clk/rockchip/Makefile
|
||||
+++ b/drivers/clk/rockchip/Makefile
|
||||
@@ -27,6 +27,7 @@ obj-$(CONFIG_CLK_RK3308) += clk-r
|
||||
obj-$(CONFIG_CLK_RK3328) += clk-rk3328.o
|
||||
obj-$(CONFIG_CLK_RK3368) += clk-rk3368.o
|
||||
obj-$(CONFIG_CLK_RK3399) += clk-rk3399.o
|
||||
+obj-$(CONFIG_CLK_RK3528) += clk-rk3528.o
|
||||
obj-$(CONFIG_CLK_RK3568) += clk-rk3568.o
|
||||
obj-$(CONFIG_CLK_RK3576) += clk-rk3576.o rst-rk3576.o
|
||||
obj-$(CONFIG_CLK_RK3588) += clk-rk3588.o rst-rk3588.o
|
||||
--- a/drivers/clk/rockchip/clk.c
|
||||
+++ b/drivers/clk/rockchip/clk.c
|
||||
@@ -527,6 +527,14 @@ void rockchip_clk_register_branches(stru
|
||||
ctx->reg_base + list->gate_offset,
|
||||
list->gate_shift, list->gate_flags, &ctx->lock);
|
||||
break;
|
||||
+ case branch_gate_no_set_rate:
|
||||
+ flags &= ~CLK_SET_RATE_PARENT;
|
||||
+
|
||||
+ clk = clk_register_gate(NULL, list->name,
|
||||
+ list->parent_names[0], flags,
|
||||
+ ctx->reg_base + list->gate_offset,
|
||||
+ list->gate_shift, list->gate_flags, &ctx->lock);
|
||||
+ break;
|
||||
case branch_composite:
|
||||
clk = rockchip_clk_register_branch(list->name,
|
||||
list->parent_names, list->num_parents,
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -207,6 +207,34 @@ struct clk;
|
||||
#define RK3399_PMU_CLKGATE_CON(x) ((x) * 0x4 + 0x100)
|
||||
#define RK3399_PMU_SOFTRST_CON(x) ((x) * 0x4 + 0x110)
|
||||
|
||||
+#define RK3528_PMU_CRU_BASE 0x10000
|
||||
+#define RK3528_PCIE_CRU_BASE 0x20000
|
||||
+#define RK3528_DDRPHY_CRU_BASE 0x28000
|
||||
+#define RK3528_VPU_GRF_BASE 0x40000
|
||||
+#define RK3528_VO_GRF_BASE 0x60000
|
||||
+#define RK3528_SDMMC_CON0 (RK3528_VO_GRF_BASE + 0x24)
|
||||
+#define RK3528_SDMMC_CON1 (RK3528_VO_GRF_BASE + 0x28)
|
||||
+#define RK3528_SDIO0_CON0 (RK3528_VPU_GRF_BASE + 0x4)
|
||||
+#define RK3528_SDIO0_CON1 (RK3528_VPU_GRF_BASE + 0x8)
|
||||
+#define RK3528_SDIO1_CON0 (RK3528_VPU_GRF_BASE + 0xc)
|
||||
+#define RK3528_SDIO1_CON1 (RK3528_VPU_GRF_BASE + 0x10)
|
||||
+#define RK3528_PLL_CON(x) RK2928_PLL_CON(x)
|
||||
+#define RK3528_PCIE_PLL_CON(x) ((x) * 0x4 + RK3528_PCIE_CRU_BASE)
|
||||
+#define RK3528_DDRPHY_PLL_CON(x) ((x) * 0x4 + RK3528_DDRPHY_CRU_BASE)
|
||||
+#define RK3528_MODE_CON 0x280
|
||||
+#define RK3528_CLKSEL_CON(x) ((x) * 0x4 + 0x300)
|
||||
+#define RK3528_CLKGATE_CON(x) ((x) * 0x4 + 0x800)
|
||||
+#define RK3528_SOFTRST_CON(x) ((x) * 0x4 + 0xa00)
|
||||
+#define RK3528_PMU_CLKSEL_CON(x) ((x) * 0x4 + 0x300 + RK3528_PMU_CRU_BASE)
|
||||
+#define RK3528_PMU_CLKGATE_CON(x) ((x) * 0x4 + 0x800 + RK3528_PMU_CRU_BASE)
|
||||
+#define RK3528_PCIE_CLKSEL_CON(x) ((x) * 0x4 + 0x300 + RK3528_PCIE_CRU_BASE)
|
||||
+#define RK3528_PCIE_CLKGATE_CON(x) ((x) * 0x4 + 0x800 + RK3528_PCIE_CRU_BASE)
|
||||
+#define RK3528_DDRPHY_CLKGATE_CON(x) ((x) * 0x4 + 0x800 + RK3528_DDRPHY_CRU_BASE)
|
||||
+#define RK3528_DDRPHY_MODE_CON (0x280 + RK3528_DDRPHY_CRU_BASE)
|
||||
+#define RK3528_GLB_CNT_TH 0xc00
|
||||
+#define RK3528_GLB_SRST_FST 0xc08
|
||||
+#define RK3528_GLB_SRST_SND 0xc0c
|
||||
+
|
||||
#define RK3568_PLL_CON(x) RK2928_PLL_CON(x)
|
||||
#define RK3568_MODE_CON0 0xc0
|
||||
#define RK3568_MISC_CON0 0xc4
|
||||
@@ -461,6 +489,7 @@ struct rockchip_pll_clock {
|
||||
};
|
||||
|
||||
#define ROCKCHIP_PLL_SYNC_RATE BIT(0)
|
||||
+#define ROCKCHIP_PLL_FIXED_MODE BIT(1)
|
||||
|
||||
#define PLL(_type, _id, _name, _pnames, _flags, _con, _mode, _mshift, \
|
||||
_lshift, _pflags, _rtable) \
|
||||
@@ -569,6 +598,7 @@ enum rockchip_clk_branch_type {
|
||||
branch_muxgrf,
|
||||
branch_divider,
|
||||
branch_fraction_divider,
|
||||
+ branch_gate_no_set_rate,
|
||||
branch_gate,
|
||||
branch_mmc,
|
||||
branch_inverter,
|
||||
@@ -889,6 +919,19 @@ struct rockchip_clk_branch {
|
||||
.name = cname, \
|
||||
.parent_names = (const char *[]){ pname }, \
|
||||
.num_parents = 1, \
|
||||
+ .flags = f, \
|
||||
+ .gate_offset = o, \
|
||||
+ .gate_shift = b, \
|
||||
+ .gate_flags = gf, \
|
||||
+ }
|
||||
+
|
||||
+#define GATE_NO_SET_RATE(_id, cname, pname, f, o, b, gf) \
|
||||
+ { \
|
||||
+ .id = _id, \
|
||||
+ .branch_type = branch_gate_no_set_rate, \
|
||||
+ .name = cname, \
|
||||
+ .parent_names = (const char *[]){ pname }, \
|
||||
+ .num_parents = 1, \
|
||||
.flags = f, \
|
||||
.gate_offset = o, \
|
||||
.gate_shift = b, \
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
From 61c0ac431798861b0696ccc549138b2eec8a4766 Mon Sep 17 00:00:00 2001
|
||||
From: David Wu <david.wu@rock-chips.com>
|
||||
Date: Sat, 24 Sep 2022 18:29:52 +0800
|
||||
Subject: [PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for RK3528
|
||||
|
||||
Add constants and callback functions for the dwmac on RK3528 Soc.
|
||||
As can be seen, the base structure is the same. In addition, there
|
||||
is an internal phy inside with Gmac0.
|
||||
|
||||
Signed-off-by: David Wu <david.wu@rock-chips.com>
|
||||
Change-Id: I8a69a1239ed3ae91bfe44c96287210da758f9cf9
|
||||
---
|
||||
.../net/ethernet/stmicro/stmmac/dwmac-rk.c | 179 +++++++++++++++++-
|
||||
1 file changed, 173 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
|
||||
@@ -1140,6 +1140,201 @@ static const struct rk_gmac_ops rk3399_o
|
||||
.set_rmii_speed = rk3399_set_rmii_speed,
|
||||
};
|
||||
|
||||
+#define RK3528_VO_GRF_GMAC_CON 0X60018
|
||||
+#define RK3528_VPU_GRF_GMAC_CON5 0X40018
|
||||
+#define RK3528_VPU_GRF_GMAC_CON6 0X4001c
|
||||
+
|
||||
+#define RK3528_GMAC_RXCLK_DLY_ENABLE GRF_BIT(15)
|
||||
+#define RK3528_GMAC_RXCLK_DLY_DISABLE GRF_CLR_BIT(15)
|
||||
+#define RK3528_GMAC_TXCLK_DLY_ENABLE GRF_BIT(14)
|
||||
+#define RK3528_GMAC_TXCLK_DLY_DISABLE GRF_CLR_BIT(14)
|
||||
+
|
||||
+#define RK3528_GMAC_CLK_RX_DL_CFG(val) HIWORD_UPDATE(val, 0xFF, 8)
|
||||
+#define RK3528_GMAC_CLK_TX_DL_CFG(val) HIWORD_UPDATE(val, 0xFF, 0)
|
||||
+
|
||||
+#define RK3528_GMAC0_PHY_INTF_SEL_RMII GRF_BIT(1)
|
||||
+#define RK3528_GMAC1_PHY_INTF_SEL_RGMII GRF_CLR_BIT(8)
|
||||
+#define RK3528_GMAC1_PHY_INTF_SEL_RMII GRF_BIT(8)
|
||||
+
|
||||
+#define RK3528_GMAC1_CLK_SELET_CRU GRF_CLR_BIT(12)
|
||||
+#define RK3528_GMAC1_CLK_SELET_IO GRF_BIT(12)
|
||||
+
|
||||
+#define RK3528_GMAC0_CLK_RMII_DIV2 GRF_BIT(3)
|
||||
+#define RK3528_GMAC0_CLK_RMII_DIV20 GRF_CLR_BIT(3)
|
||||
+#define RK3528_GMAC1_CLK_RMII_DIV2 GRF_BIT(10)
|
||||
+#define RK3528_GMAC1_CLK_RMII_DIV20 GRF_CLR_BIT(10)
|
||||
+
|
||||
+#define RK3528_GMAC1_CLK_RGMII_DIV1 \
|
||||
+ (GRF_CLR_BIT(11) | GRF_CLR_BIT(10))
|
||||
+#define RK3528_GMAC1_CLK_RGMII_DIV5 \
|
||||
+ (GRF_BIT(11) | GRF_BIT(10))
|
||||
+#define RK3528_GMAC1_CLK_RGMII_DIV50 \
|
||||
+ (GRF_BIT(11) | GRF_CLR_BIT(10))
|
||||
+
|
||||
+#define RK3528_GMAC0_CLK_RMII_GATE GRF_BIT(2)
|
||||
+#define RK3528_GMAC0_CLK_RMII_NOGATE GRF_CLR_BIT(2)
|
||||
+#define RK3528_GMAC1_CLK_RMII_GATE GRF_BIT(9)
|
||||
+#define RK3528_GMAC1_CLK_RMII_NOGATE GRF_CLR_BIT(9)
|
||||
+
|
||||
+#define RK3528_VO_GRF_MACPHY_CON0 0X6001c
|
||||
+#define RK3528_VO_GRF_MACPHY_CON1 0X60020
|
||||
+
|
||||
+static void rk3528_set_to_rgmii(struct rk_priv_data *bsp_priv,
|
||||
+ int tx_delay, int rx_delay)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+
|
||||
+ if (IS_ERR(bsp_priv->grf)) {
|
||||
+ dev_err(dev, "Missing rockchip,grf property\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON5,
|
||||
+ RK3528_GMAC1_PHY_INTF_SEL_RGMII);
|
||||
+
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON5,
|
||||
+ RK3528_GMAC_CLK_RX_DL_CFG(rx_delay) |
|
||||
+ RK3528_GMAC_CLK_TX_DL_CFG(tx_delay));
|
||||
+
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON6,
|
||||
+ RK3528_GMAC_CLK_RX_DL_CFG(rx_delay) |
|
||||
+ RK3528_GMAC_CLK_TX_DL_CFG(tx_delay));
|
||||
+}
|
||||
+
|
||||
+static void rk3528_set_to_rmii(struct rk_priv_data *bsp_priv)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ unsigned int id = bsp_priv->id;
|
||||
+
|
||||
+ if (IS_ERR(bsp_priv->grf)) {
|
||||
+ dev_err(dev, "%s: Missing rockchip,grf property\n", __func__);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (id == 1)
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON5,
|
||||
+ RK3528_GMAC1_PHY_INTF_SEL_RMII);
|
||||
+ else
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VO_GRF_GMAC_CON,
|
||||
+ RK3528_GMAC0_PHY_INTF_SEL_RMII);
|
||||
+}
|
||||
+
|
||||
+static void rk3528_set_rgmii_speed(struct rk_priv_data *bsp_priv, int speed)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ unsigned int val = 0;
|
||||
+
|
||||
+ switch (speed) {
|
||||
+ case 10:
|
||||
+ val = RK3528_GMAC1_CLK_RGMII_DIV50;
|
||||
+ break;
|
||||
+ case 100:
|
||||
+ val = RK3528_GMAC1_CLK_RGMII_DIV5;
|
||||
+ break;
|
||||
+ case 1000:
|
||||
+ val = RK3528_GMAC1_CLK_RGMII_DIV1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON5, val);
|
||||
+ return;
|
||||
+err:
|
||||
+ dev_err(dev, "unknown RGMII speed value for GMAC speed=%d", speed);
|
||||
+}
|
||||
+
|
||||
+static void rk3528_set_rmii_speed(struct rk_priv_data *bsp_priv, int speed)
|
||||
+{
|
||||
+ struct device *dev = &bsp_priv->pdev->dev;
|
||||
+ unsigned int val, offset, id = bsp_priv->id;
|
||||
+
|
||||
+ switch (speed) {
|
||||
+ case 10:
|
||||
+ val = (id == 1) ? RK3528_GMAC1_CLK_RMII_DIV20 :
|
||||
+ RK3528_GMAC0_CLK_RMII_DIV20;
|
||||
+ break;
|
||||
+ case 100:
|
||||
+ val = (id == 1) ? RK3528_GMAC1_CLK_RMII_DIV2 :
|
||||
+ RK3528_GMAC0_CLK_RMII_DIV2;
|
||||
+ break;
|
||||
+ default:
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ offset = (id == 1) ? RK3528_VPU_GRF_GMAC_CON5 : RK3528_VO_GRF_GMAC_CON;
|
||||
+ regmap_write(bsp_priv->grf, offset, val);
|
||||
+
|
||||
+ return;
|
||||
+err:
|
||||
+ dev_err(dev, "unknown RMII speed value for GMAC speed=%d", speed);
|
||||
+}
|
||||
+
|
||||
+static void rk3528_set_clock_selection(struct rk_priv_data *bsp_priv,
|
||||
+ bool input, bool enable)
|
||||
+{
|
||||
+ unsigned int value, id = bsp_priv->id;
|
||||
+
|
||||
+ if (id == 1) {
|
||||
+ value = input ? RK3528_GMAC1_CLK_SELET_IO :
|
||||
+ RK3528_GMAC1_CLK_SELET_CRU;
|
||||
+ value |= enable ? RK3528_GMAC1_CLK_RMII_NOGATE :
|
||||
+ RK3528_GMAC1_CLK_RMII_GATE;
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VPU_GRF_GMAC_CON5, value);
|
||||
+ } else {
|
||||
+ value = enable ? RK3528_GMAC0_CLK_RMII_NOGATE :
|
||||
+ RK3528_GMAC0_CLK_RMII_GATE;
|
||||
+ regmap_write(bsp_priv->grf, RK3528_VO_GRF_GMAC_CON, value);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Integrated FEPHY */
|
||||
+#define RK_FEPHY_SHUTDOWN GRF_BIT(1)
|
||||
+#define RK_FEPHY_POWERUP GRF_CLR_BIT(1)
|
||||
+#define RK_FEPHY_INTERNAL_RMII_SEL GRF_BIT(6)
|
||||
+#define RK_FEPHY_24M_CLK_SEL (GRF_BIT(8) | GRF_BIT(9))
|
||||
+#define RK_FEPHY_PHY_ID GRF_BIT(11)
|
||||
+
|
||||
+#define RK_FEPHY_BGS HIWORD_UPDATE(0x0, 0xf, 0)
|
||||
+
|
||||
+static void rk3528_integrated_sphy_power(struct rk_priv_data *priv)
|
||||
+{
|
||||
+ struct device *dev = &priv->pdev->dev;
|
||||
+
|
||||
+ if (IS_ERR(priv->grf) || !priv->phy_reset) {
|
||||
+ dev_err(dev, "%s: Missing rockchip,grf or phy_reset property\n",
|
||||
+ __func__);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ unsigned int bgs = RK_FEPHY_BGS;
|
||||
+
|
||||
+ reset_control_assert(priv->phy_reset);
|
||||
+ udelay(20);
|
||||
+ regmap_write(priv->grf, RK3528_VO_GRF_MACPHY_CON0,
|
||||
+ RK_FEPHY_POWERUP |
|
||||
+ RK_FEPHY_INTERNAL_RMII_SEL |
|
||||
+ RK_FEPHY_24M_CLK_SEL |
|
||||
+ RK_FEPHY_PHY_ID);
|
||||
+
|
||||
+ /*if (priv->otp_data > 0)
|
||||
+ bgs = HIWORD_UPDATE(priv->otp_data, 0xf, 0);*/
|
||||
+
|
||||
+ regmap_write(priv->grf, RK3528_VO_GRF_MACPHY_CON1, bgs);
|
||||
+ usleep_range(10 * 1000, 12 * 1000);
|
||||
+ reset_control_deassert(priv->phy_reset);
|
||||
+ usleep_range(50 * 1000, 60 * 1000);
|
||||
+}
|
||||
+
|
||||
+static const struct rk_gmac_ops rk3528_ops = {
|
||||
+ .set_to_rgmii = rk3528_set_to_rgmii,
|
||||
+ .set_to_rmii = rk3528_set_to_rmii,
|
||||
+ .set_rgmii_speed = rk3528_set_rgmii_speed,
|
||||
+ .set_rmii_speed = rk3528_set_rmii_speed,
|
||||
+ .set_clock_selection = rk3528_set_clock_selection,
|
||||
+ .integrated_phy_powerup = rk3528_integrated_sphy_power,
|
||||
+};
|
||||
+
|
||||
#define RK3568_GRF_GMAC0_CON0 0x0380
|
||||
#define RK3568_GRF_GMAC0_CON1 0x0384
|
||||
#define RK3568_GRF_GMAC1_CON0 0x0388
|
||||
@@ -2255,6 +2450,7 @@ static const struct of_device_id rk_gmac
|
||||
{ .compatible = "rockchip,rk3366-gmac", .data = &rk3366_ops },
|
||||
{ .compatible = "rockchip,rk3368-gmac", .data = &rk3368_ops },
|
||||
{ .compatible = "rockchip,rk3399-gmac", .data = &rk3399_ops },
|
||||
+ { .compatible = "rockchip,rk3528-gmac", .data = &rk3528_ops },
|
||||
{ .compatible = "rockchip,rk3568-gmac", .data = &rk3568_ops },
|
||||
{ .compatible = "rockchip,rk3576-gmac", .data = &rk3576_ops },
|
||||
{ .compatible = "rockchip,rk3588-gmac", .data = &rk3588_ops },
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
||||
@@ -1905,6 +1905,56 @@ static const struct rockchip_usb2phy_cfg
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
+static const struct rockchip_usb2phy_cfg rk3528_phy_cfgs[] = {
|
||||
+ {
|
||||
+ .reg = 0xffdf0000,
|
||||
+ .num_ports = 2,
|
||||
+ .clkout_ctl = { 0x041c, 7, 2, 0, 0x27 },
|
||||
+ .port_cfgs = {
|
||||
+ [USB2PHY_PORT_OTG] = {
|
||||
+ .phy_sus = { 0x6004c, 15, 0, 0, 0x1d1 },
|
||||
+ .bvalid_det_en = { 0x60074, 3, 2, 0, 3 },
|
||||
+ .bvalid_det_st = { 0x60078, 3, 2, 0, 3 },
|
||||
+ .bvalid_det_clr = { 0x6007c, 3, 2, 0, 3 },
|
||||
+ .idfall_det_en = { 0x60074, 5, 5, 0, 1 },
|
||||
+ .idfall_det_st = { 0x60078, 5, 5, 0, 1 },
|
||||
+ .idfall_det_clr = { 0x6007c, 5, 5, 0, 1 },
|
||||
+ .idrise_det_en = { 0x60074, 4, 4, 0, 1 },
|
||||
+ .idrise_det_st = { 0x60078, 4, 4, 0, 1 },
|
||||
+ .idrise_det_clr = { 0x6007c, 4, 4, 0, 1 },
|
||||
+ .ls_det_en = { 0x60074, 0, 0, 0, 1 },
|
||||
+ .ls_det_st = { 0x60078, 0, 0, 0, 1 },
|
||||
+ .ls_det_clr = { 0x6007c, 0, 0, 0, 1 },
|
||||
+ .utmi_avalid = { 0x6006c, 1, 1, 0, 1 },
|
||||
+ .utmi_bvalid = { 0x6006c, 0, 0, 0, 1 },
|
||||
+ .utmi_id = { 0x6006c, 6, 6, 0, 1 },
|
||||
+ .utmi_ls = { 0x6006c, 5, 4, 0, 1 },
|
||||
+ },
|
||||
+ [USB2PHY_PORT_HOST] = {
|
||||
+ .phy_sus = { 0x6005c, 15, 0, 0x1d2, 0x1d1 },
|
||||
+ .ls_det_en = { 0x60090, 0, 0, 0, 1 },
|
||||
+ .ls_det_st = { 0x60094, 0, 0, 0, 1 },
|
||||
+ .ls_det_clr = { 0x60098, 0, 0, 0, 1 },
|
||||
+ .utmi_ls = { 0x6006c, 13, 12, 0, 1 },
|
||||
+ .utmi_hstdet = { 0x6006c, 15, 15, 0, 1 }
|
||||
+ }
|
||||
+ },
|
||||
+ .chg_det = {
|
||||
+ .opmode = { 0x6004c, 3, 0, 5, 1 },
|
||||
+ .cp_det = { 0x6006c, 19, 19, 0, 1 },
|
||||
+ .dcp_det = { 0x6006c, 18, 18, 0, 1 },
|
||||
+ .dp_det = { 0x6006c, 20, 20, 0, 1 },
|
||||
+ .idm_sink_en = { 0x60058, 1, 1, 0, 1 },
|
||||
+ .idp_sink_en = { 0x60058, 0, 0, 0, 1 },
|
||||
+ .idp_src_en = { 0x60058, 2, 2, 0, 1 },
|
||||
+ .rdm_pdwn_en = { 0x60058, 3, 3, 0, 1 },
|
||||
+ .vdm_src_en = { 0x60058, 5, 5, 0, 1 },
|
||||
+ .vdp_src_en = { 0x60058, 4, 4, 0, 1 },
|
||||
+ },
|
||||
+ },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+
|
||||
static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = {
|
||||
{
|
||||
.reg = 0xfe8a0000,
|
||||
@@ -2223,6 +2273,7 @@ static const struct of_device_id rockchi
|
||||
{ .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs },
|
||||
{ .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs },
|
||||
{ .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs },
|
||||
+ { .compatible = "rockchip,rk3528-usb2phy", .data = &rk3528_phy_cfgs },
|
||||
{ .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs },
|
||||
{ .compatible = "rockchip,rk3576-usb2phy", .data = &rk3576_phy_cfgs },
|
||||
{ .compatible = "rockchip,rk3588-usb2phy", .data = &rk3588_phy_cfgs },
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
From 432666b59bdbef2c386e92dd88be4206203ff8ac Mon Sep 17 00:00:00 2001
|
||||
From: Jon Lin <jon.lin@rock-chips.com>
|
||||
Date: Sat, 8 Oct 2022 15:48:37 +0800
|
||||
Subject: [PATCH] phy: rockchip: naneng-combphy: add support rk3528
|
||||
|
||||
1. The layout of controller registers has changed, remove legacy config;
|
||||
2. Using the default value for grf register;
|
||||
3. sync to use rk3568 parameter for phy PLL, signal test pass
|
||||
4. Add 24MHz refclk for rk3528 PCIe, Enable the counting clock of the
|
||||
rterm detect by setting tx_trim[14] bit for rx detecting.
|
||||
5. set SSC modulation frequency to 31.5KHz
|
||||
|
||||
Change-Id: I45742c416d452037e61b7a7b8765269931d56402
|
||||
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
|
||||
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
|
||||
---
|
||||
.../rockchip/phy-rockchip-naneng-combphy.c | 139 +++++++++++++++++-
|
||||
1 file changed, 138 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
|
||||
@@ -97,7 +97,7 @@
|
||||
struct rockchip_combphy_priv;
|
||||
|
||||
struct combphy_reg {
|
||||
- u16 offset;
|
||||
+ u32 offset;
|
||||
u16 bitend;
|
||||
u16 bitstart;
|
||||
u16 disable;
|
||||
@@ -107,6 +107,7 @@ struct combphy_reg {
|
||||
struct rockchip_combphy_grfcfg {
|
||||
struct combphy_reg pcie_mode_set;
|
||||
struct combphy_reg usb_mode_set;
|
||||
+ struct combphy_reg u3otg0_port_en;
|
||||
struct combphy_reg sgmii_mode_set;
|
||||
struct combphy_reg qsgmii_mode_set;
|
||||
struct combphy_reg pipe_rxterm_set;
|
||||
@@ -393,6 +394,120 @@ static int rockchip_combphy_probe(struct
|
||||
return PTR_ERR_OR_ZERO(phy_provider);
|
||||
}
|
||||
|
||||
+static int rk3528_combphy_cfg(struct rockchip_combphy_priv *priv)
|
||||
+{
|
||||
+ const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
|
||||
+ unsigned long rate;
|
||||
+ u32 val;
|
||||
+
|
||||
+ switch (priv->type) {
|
||||
+ case PHY_TYPE_PCIE:
|
||||
+ /* Set SSC downward spread spectrum. */
|
||||
+ val = readl(priv->mmio + 0x18);
|
||||
+ val &= ~GENMASK(5, 4);
|
||||
+ val |= 0x01 << 4;
|
||||
+ writel(val, priv->mmio + 0x18);
|
||||
+
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_pcie, true);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_pcie, true);
|
||||
+ break;
|
||||
+
|
||||
+ case PHY_TYPE_USB3:
|
||||
+ /* Set SSC downward spread spectrum. */
|
||||
+ val = readl(priv->mmio + 0x18);
|
||||
+ val &= ~GENMASK(5, 4);
|
||||
+ val |= 0x01 << 4;
|
||||
+ writel(val, priv->mmio + 0x18);
|
||||
+
|
||||
+ /* Enable adaptive CTLE for USB3.0 Rx. */
|
||||
+ val = readl(priv->mmio + 0x200);
|
||||
+ val &= ~GENMASK(17, 17);
|
||||
+ val |= 0x01 << 17;
|
||||
+ writel(val, priv->mmio + 0x200);
|
||||
+
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txcomp_sel, false);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_txelec_sel, false);
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->usb_mode_set, true);
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(priv->dev, "incompatible PHY type\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ rate = clk_get_rate(priv->refclk);
|
||||
+
|
||||
+ switch (rate) {
|
||||
+ case REF_CLOCK_24MHz:
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_24m, true);
|
||||
+ if (priv->type == PHY_TYPE_USB3) {
|
||||
+ /* Set ssc_cnt[10:0]=00101111101 & 31.5KHz. */
|
||||
+ val = readl(priv->mmio + 0x100);
|
||||
+ val &= ~GENMASK(10, 0);
|
||||
+ val |= 0x17d;
|
||||
+ writel(val, priv->mmio + 0x100);
|
||||
+ } else if (priv->type == PHY_TYPE_PCIE) {
|
||||
+ /* tx_trim[14]=1, Enable the counting clock of the rterm detect */
|
||||
+ val = readl(priv->mmio + 0x218);
|
||||
+ val |= (1 << 14);
|
||||
+ writel(val, priv->mmio + 0x218);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case REF_CLOCK_100MHz:
|
||||
+ rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_100m, true);
|
||||
+ if (priv->type == PHY_TYPE_PCIE) {
|
||||
+ /* PLL KVCO tuning fine. */
|
||||
+ val = readl(priv->mmio + 0x18);
|
||||
+ val &= ~(0x7 << 10);
|
||||
+ val |= 0x2 << 10;
|
||||
+ writel(val, priv->mmio + 0x18);
|
||||
+
|
||||
+ /* su_trim[6:4]=111, [10:7]=1001, [2:0]=000 */
|
||||
+ val = readl(priv->mmio + 0x108);
|
||||
+ val &= ~(0x7f7);
|
||||
+ val |= 0x4f0;
|
||||
+ writel(val, priv->mmio + 0x108);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ dev_err(priv->dev, "unsupported rate: %lu\n", rate);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct rockchip_combphy_grfcfg rk3528_combphy_grfcfgs = {
|
||||
+ /* pipe-phy-grf */
|
||||
+ .pcie_mode_set = { 0x48000, 5, 0, 0x00, 0x11 },
|
||||
+ .usb_mode_set = { 0x48000, 5, 0, 0x00, 0x04 },
|
||||
+ .pipe_rxterm_set = { 0x48000, 12, 12, 0x00, 0x01 },
|
||||
+ .pipe_txelec_set = { 0x48004, 1, 1, 0x00, 0x01 },
|
||||
+ .pipe_txcomp_set = { 0x48004, 4, 4, 0x00, 0x01 },
|
||||
+ .pipe_clk_24m = { 0x48004, 14, 13, 0x00, 0x00 },
|
||||
+ .pipe_clk_100m = { 0x48004, 14, 13, 0x00, 0x02 },
|
||||
+ .pipe_rxterm_sel = { 0x48008, 8, 8, 0x00, 0x01 },
|
||||
+ .pipe_txelec_sel = { 0x48008, 12, 12, 0x00, 0x01 },
|
||||
+ .pipe_txcomp_sel = { 0x48008, 15, 15, 0x00, 0x01 },
|
||||
+ .pipe_clk_ext = { 0x4800c, 9, 8, 0x02, 0x01 },
|
||||
+ .pipe_phy_status = { 0x48034, 6, 6, 0x01, 0x00 },
|
||||
+ .con0_for_pcie = { 0x48000, 15, 0, 0x00, 0x110 },
|
||||
+ .con1_for_pcie = { 0x48004, 15, 0, 0x00, 0x00 },
|
||||
+ .con2_for_pcie = { 0x48008, 15, 0, 0x00, 0x101 },
|
||||
+ .con3_for_pcie = { 0x4800c, 15, 0, 0x00, 0x0200 },
|
||||
+ /* pipe-grf */
|
||||
+ .u3otg0_port_en = { 0x40044, 15, 0, 0x0181, 0x1100 },
|
||||
+};
|
||||
+
|
||||
+static const struct rockchip_combphy_cfg rk3528_combphy_cfgs = {
|
||||
+ .grfcfg = &rk3528_combphy_grfcfgs,
|
||||
+ .combphy_cfg = rk3528_combphy_cfg,
|
||||
+};
|
||||
+
|
||||
static int rk3568_combphy_cfg(struct rockchip_combphy_priv *priv)
|
||||
{
|
||||
const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
|
||||
@@ -1047,6 +1162,10 @@ static const struct rockchip_combphy_cfg
|
||||
|
||||
static const struct of_device_id rockchip_combphy_of_match[] = {
|
||||
{
|
||||
+ .compatible = "rockchip,rk3528-naneng-combphy",
|
||||
+ .data = &rk3528_combphy_cfgs,
|
||||
+ },
|
||||
+ {
|
||||
.compatible = "rockchip,rk3568-naneng-combphy",
|
||||
.data = &rk3568_combphy_cfgs,
|
||||
},
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
@@ -688,19 +688,20 @@ static void dwcmshc_rk3568_set_clock(str
|
||||
0x3 << 19; /* post-change delay */
|
||||
sdhci_writel(host, extra, dwc_priv->vendor_specific_area1 + DWCMSHC_EMMC_ATCTRL);
|
||||
|
||||
- if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
|
||||
- host->mmc->ios.timing == MMC_TIMING_MMC_HS400)
|
||||
+ if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200)
|
||||
txclk_tapnum = priv->txclk_tapnum;
|
||||
|
||||
- if ((priv->devtype == DWCMSHC_RK3588) && host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
|
||||
+ if (host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
|
||||
txclk_tapnum = DLL_TXCLK_TAPNUM_90_DEGREES;
|
||||
|
||||
- extra = DLL_CMDOUT_SRC_CLK_NEG |
|
||||
- DLL_CMDOUT_EN_SRC_CLK_NEG |
|
||||
- DWCMSHC_EMMC_DLL_DLYENA |
|
||||
- DLL_CMDOUT_TAPNUM_90_DEGREES |
|
||||
- DLL_CMDOUT_TAPNUM_FROM_SW;
|
||||
- sdhci_writel(host, extra, DECMSHC_EMMC_DLL_CMDOUT);
|
||||
+ if (priv->devtype != DWCMSHC_RK3568) {
|
||||
+ extra = DLL_CMDOUT_SRC_CLK_NEG |
|
||||
+ DLL_CMDOUT_EN_SRC_CLK_NEG |
|
||||
+ DWCMSHC_EMMC_DLL_DLYENA |
|
||||
+ DLL_CMDOUT_TAPNUM_90_DEGREES |
|
||||
+ DLL_CMDOUT_TAPNUM_FROM_SW;
|
||||
+ sdhci_writel(host, extra, DECMSHC_EMMC_DLL_CMDOUT);
|
||||
+ }
|
||||
}
|
||||
|
||||
extra = DWCMSHC_EMMC_DLL_DLYENA |
|
||||
@@ -741,10 +742,10 @@ static int dwcmshc_rk35xx_init(struct de
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
- if (of_device_is_compatible(dev->of_node, "rockchip,rk3588-dwcmshc"))
|
||||
- priv->devtype = DWCMSHC_RK3588;
|
||||
- else
|
||||
+ if (of_device_is_compatible(dev->of_node, "rockchip,rk3568-dwcmshc"))
|
||||
priv->devtype = DWCMSHC_RK3568;
|
||||
+ else
|
||||
+ priv->devtype = DWCMSHC_RK3588;
|
||||
|
||||
priv->reset = devm_reset_control_array_get_optional_exclusive(mmc_dev(host->mmc));
|
||||
if (IS_ERR(priv->reset)) {
|
||||
@@ -1156,6 +1157,16 @@ static const struct sdhci_ops sdhci_dwcm
|
||||
.irq = dwcmshc_cqe_irq_handler,
|
||||
};
|
||||
|
||||
+static const struct sdhci_ops sdhci_dwcmshc_rk3528_ops = {
|
||||
+ .set_clock = dwcmshc_rk3568_set_clock,
|
||||
+ .set_bus_width = sdhci_set_bus_width,
|
||||
+ .set_uhs_signaling = dwcmshc_set_uhs_signaling,
|
||||
+ .get_max_clock = sdhci_pltfm_clk_get_max_clock,
|
||||
+ .reset = rk35xx_sdhci_reset,
|
||||
+ .adma_write_desc = dwcmshc_adma_write_desc,
|
||||
+ .irq = dwcmshc_cqe_irq_handler,
|
||||
+};
|
||||
+
|
||||
static const struct sdhci_ops sdhci_dwcmshc_th1520_ops = {
|
||||
.set_clock = sdhci_set_clock,
|
||||
.set_bus_width = sdhci_set_bus_width,
|
||||
@@ -1218,6 +1229,18 @@ static const struct dwcmshc_pltfm_data s
|
||||
.postinit = dwcmshc_rk35xx_postinit,
|
||||
};
|
||||
|
||||
+static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk3528_pdata = {
|
||||
+ .pdata = {
|
||||
+ .ops = &sdhci_dwcmshc_rk3528_ops,
|
||||
+ .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
|
||||
+ SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
|
||||
+ .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
|
||||
+ SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
|
||||
+ },
|
||||
+ .init = dwcmshc_rk35xx_init,
|
||||
+ .postinit = dwcmshc_rk35xx_postinit,
|
||||
+};
|
||||
+
|
||||
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_th1520_pdata = {
|
||||
.pdata = {
|
||||
.ops = &sdhci_dwcmshc_th1520_ops,
|
||||
@@ -1320,6 +1343,10 @@ static const struct of_device_id sdhci_d
|
||||
.compatible = "rockchip,rk3568-dwcmshc",
|
||||
.data = &sdhci_dwcmshc_rk35xx_pdata,
|
||||
},
|
||||
+ {
|
||||
+ .compatible = "rockchip,rk3528-dwcmshc",
|
||||
+ .data = &sdhci_dwcmshc_rk3528_pdata,
|
||||
+ },
|
||||
{
|
||||
.compatible = "snps,dwcmshc-sdhci",
|
||||
.data = &sdhci_dwcmshc_pdata,
|
||||
--- a/drivers/pci/controller/dwc/Makefile
|
||||
+++ b/drivers/pci/controller/dwc/Makefile
|
||||
@@ -18,6 +18,7 @@ obj-$(CONFIG_PCIE_QCOM_EP) += pcie-qcom-
|
||||
obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
|
||||
obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o
|
||||
obj-$(CONFIG_PCIE_ROCKCHIP_DW) += pcie-dw-rockchip.o
|
||||
+obj-$(CONFIG_PCIE_ROCKCHIP_DW) += pcie-dw-rkvendor.o
|
||||
obj-$(CONFIG_PCIE_INTEL_GW) += pcie-intel-gw.o
|
||||
obj-$(CONFIG_PCIE_KEEMBAY) += pcie-keembay.o
|
||||
obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
From 4ff037c13c1e7ab16362d39a59ebb8fffb929f99 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Date: Wed, 15 Apr 2020 09:19:09 +0800
|
||||
Subject: [PATCH] mmc: dw_mmc-rockchip: add v2 tuning support
|
||||
|
||||
v2 tuning will inherit pre-stage loader's phase
|
||||
settings for the first time, and do re-tune if
|
||||
necessary. Re-tune will still try the rough degrees,
|
||||
for instance, 90, 180, 270, 360 but continue to do the
|
||||
fine tuning if sample window isn't good enough.
|
||||
|
||||
Change-Id: I593384ee381d09df5b9adfc29a18eb22517b2764
|
||||
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
---
|
||||
drivers/mmc/host/dw_mmc-rockchip.c | 48 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 48 insertions(+)
|
||||
|
||||
--- a/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
|
||||
@@ -35,6 +35,8 @@ struct dw_mci_rockchip_priv_data {
|
||||
int default_sample_phase;
|
||||
int num_phases;
|
||||
bool internal_phase;
|
||||
+ int last_degree;
|
||||
+ bool use_v2_tuning;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -279,6 +281,58 @@ static void dw_mci_rk3288_set_ios(struct
|
||||
#define TUNING_ITERATION_TO_PHASE(i, num_phases) \
|
||||
(DIV_ROUND_UP((i) * 360, num_phases))
|
||||
|
||||
+static int dw_mci_v2_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
+{
|
||||
+ struct dw_mci *host = slot->host;
|
||||
+ struct dw_mci_rockchip_priv_data *priv = host->priv;
|
||||
+ struct mmc_host *mmc = slot->mmc;
|
||||
+ u32 degrees[4] = {0, 90, 180, 270}, degree;
|
||||
+ int i;
|
||||
+ static bool inherit = true;
|
||||
+
|
||||
+ if (inherit) {
|
||||
+ inherit = false;
|
||||
+ i = clk_get_phase(priv->sample_clk) / 90;
|
||||
+ degree = degrees[i];
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * v2 only support 4 degrees in theory.
|
||||
+ * First we inherit sample phases from firmware, which should
|
||||
+ * be able work fine, at least in the first place.
|
||||
+ * If retune is needed, we search forward to pick the last
|
||||
+ * one phase from degree list and loop around until we get one.
|
||||
+ * It's impossible all 4 fixed phase won't be able to work.
|
||||
+ */
|
||||
+ for (i = 0; i < ARRAY_SIZE(degrees); i++) {
|
||||
+ degree = degrees[i] + priv->last_degree + 90;
|
||||
+ degree = degree % 360;
|
||||
+ clk_set_phase(priv->sample_clk, degree);
|
||||
+ if (mmc_send_tuning(mmc, opcode, NULL)) {
|
||||
+ /*
|
||||
+ * Tuning error, the phase is a bad phase,
|
||||
+ * then try using the calculated best phase.
|
||||
+ */
|
||||
+ dev_info(host->dev, "V2 tuned phase to %d error, try the best phase\n", degree);
|
||||
+ degree = (degree + 180) % 360;
|
||||
+ clk_set_phase(priv->sample_clk, degree);
|
||||
+ if (!mmc_send_tuning(mmc, opcode, NULL))
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (i == ARRAY_SIZE(degrees)) {
|
||||
+ dev_warn(host->dev, "V2 All phases bad!");
|
||||
+ return -EIO;
|
||||
+ }
|
||||
+
|
||||
+done:
|
||||
+ dev_info(host->dev, "V2 Successfully tuned phase to %d\n", degree);
|
||||
+ priv->last_degree = degree;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
{
|
||||
struct dw_mci *host = slot->host;
|
||||
@@ -303,6 +357,12 @@ static int dw_mci_rk3288_execute_tuning(
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
+ if (priv->use_v2_tuning) {
|
||||
+ if (!dw_mci_v2_execute_tuning(slot, opcode))
|
||||
+ return 0;
|
||||
+ /* Otherwise we continue using fine tuning */
|
||||
+ }
|
||||
+
|
||||
ranges = kmalloc_array(priv->num_phases / 2 + 1,
|
||||
sizeof(*ranges), GFP_KERNEL);
|
||||
if (!ranges)
|
||||
@@ -431,6 +491,7 @@ static int dw_mci_common_parse_dt(struct
|
||||
|
||||
static int dw_mci_rk3288_parse_dt(struct dw_mci *host)
|
||||
{
|
||||
+ struct device_node *np = host->dev->of_node;
|
||||
struct dw_mci_rockchip_priv_data *priv;
|
||||
int err;
|
||||
|
||||
@@ -440,6 +501,9 @@ static int dw_mci_rk3288_parse_dt(struct
|
||||
|
||||
priv = host->priv;
|
||||
|
||||
+ if (of_property_read_bool(np, "rockchip,use-v2-tuning"))
|
||||
+ priv->use_v2_tuning = true;
|
||||
+
|
||||
priv->drv_clk = devm_clk_get(host->dev, "ciu-drive");
|
||||
if (IS_ERR(priv->drv_clk))
|
||||
dev_dbg(host->dev, "ciu-drive not available\n");
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From e5b5361651940ff5c0c1784dfd0130abec7ab535 Mon Sep 17 00:00:00 2001
|
||||
From: wevsty <ty@wevs.org>
|
||||
Date: Mon, 24 Aug 2020 02:27:11 +0800
|
||||
Subject: [PATCH] char: add support for rockchip hardware random number
|
||||
generator
|
||||
|
||||
This patch provides hardware random number generator support for all rockchip SOC.
|
||||
|
||||
rockchip-rng.c from https://github.com/rockchip-linux/kernel/blob/develop-4.4/drivers/char/hw_random/rockchip-rng.c
|
||||
|
||||
Signed-off-by: wevsty <ty@wevs.org>
|
||||
---
|
||||
|
||||
--- a/drivers/char/hw_random/Kconfig
|
||||
+++ b/drivers/char/hw_random/Kconfig
|
||||
@@ -383,6 +383,19 @@ config HW_RANDOM_STM32
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config HW_RANDOM_ROCKCHIP
|
||||
+ tristate "Rockchip Random Number Generator support"
|
||||
+ depends on ARCH_ROCKCHIP
|
||||
+ default HW_RANDOM
|
||||
+ help
|
||||
+ This driver provides kernel-side support for the Random Number
|
||||
+ Generator hardware found on Rockchip cpus.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called rockchip-rng.
|
||||
+
|
||||
+ If unsure, say Y.
|
||||
+
|
||||
config HW_RANDOM_PIC32
|
||||
tristate "Microchip PIC32 Random Number Generator support"
|
||||
depends on MACH_PIC32 || COMPILE_TEST
|
||||
--- a/drivers/char/hw_random/Makefile
|
||||
+++ b/drivers/char/hw_random/Makefile
|
||||
@@ -35,6 +35,7 @@ obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) +=
|
||||
obj-$(CONFIG_HW_RANDOM_ST) += st-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_STM32) += stm32-rng.o
|
||||
+obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_PIC32) += pic32-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_MESON) += meson-rng.o
|
||||
obj-$(CONFIG_HW_RANDOM_CAVIUM) += cavium-rng.o cavium-rng-vf.o
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
From e5b5361651940ff5c0c1784dfd0130abec7ab535 Mon Sep 17 00:00:00 2001
|
||||
From: wevsty <ty@wevs.org>
|
||||
Date: Mon, 24 Aug 2020 02:27:11 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: add hardware random number generator
|
||||
for RK3328 and RK3399
|
||||
|
||||
Adding Hardware Random Number Generator Resources to the RK3328 and RK3399.
|
||||
|
||||
Signed-off-by: wevsty <ty@wevs.org>
|
||||
---
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
|
||||
@@ -1127,10 +1127,10 @@
|
||||
};
|
||||
|
||||
rng: rng@fe388000 {
|
||||
- compatible = "rockchip,rk3568-rng";
|
||||
+ compatible = "rockchip,cryptov2-rng";
|
||||
reg = <0x0 0xfe388000 0x0 0x4000>;
|
||||
clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
|
||||
- clock-names = "core", "ahb";
|
||||
+ clock-names = "clk_trng", "hclk_trng";
|
||||
resets = <&cru SRST_TRNG_NS>;
|
||||
status = "disabled";
|
||||
};
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From fcd9629c05f373771e85920e1c1d0ab252617878 Mon Sep 17 00:00:00 2001
|
||||
From: hmz007 <hmz007@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 13:53:25 +0800
|
||||
Subject: [PATCH] PM / devfreq: rockchip: add devfreq driver for rk3328 dmc
|
||||
|
||||
Signed-off-by: hmz007 <hmz007@gmail.com>
|
||||
---
|
||||
drivers/devfreq/Kconfig | 18 +-
|
||||
drivers/devfreq/Makefile | 1 +
|
||||
drivers/devfreq/rk3328_dmc.c | 846 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 862 insertions(+), 3 deletions(-)
|
||||
create mode 100644 drivers/devfreq/rk3328_dmc.c
|
||||
|
||||
--- a/drivers/devfreq/Kconfig
|
||||
+++ b/drivers/devfreq/Kconfig
|
||||
@@ -129,6 +129,18 @@ config ARM_MEDIATEK_CCI_DEVFREQ
|
||||
buck voltages and update a proper CCI frequency. Use the notification
|
||||
to get the regulator status.
|
||||
|
||||
+config ARM_RK3328_DMC_DEVFREQ
|
||||
+ tristate "ARM RK3328 DMC DEVFREQ Driver"
|
||||
+ depends on ARCH_ROCKCHIP
|
||||
+ select DEVFREQ_EVENT_ROCKCHIP_DFI
|
||||
+ select DEVFREQ_GOV_SIMPLE_ONDEMAND
|
||||
+ select PM_DEVFREQ_EVENT
|
||||
+ select PM_OPP
|
||||
+ help
|
||||
+ This adds the DEVFREQ driver for the RK3328 DMC(Dynamic Memory Controller).
|
||||
+ It sets the frequency for the memory controller and reads the usage counts
|
||||
+ from hardware.
|
||||
+
|
||||
config ARM_RK3399_DMC_DEVFREQ
|
||||
tristate "ARM RK3399 DMC DEVFREQ Driver"
|
||||
depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \
|
||||
--- a/drivers/devfreq/Makefile
|
||||
+++ b/drivers/devfreq/Makefile
|
||||
@@ -12,6 +12,7 @@ obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) +=
|
||||
obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o
|
||||
obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o
|
||||
obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o
|
||||
+obj-$(CONFIG_ARM_RK3328_DMC_DEVFREQ) += rk3328_dmc.o
|
||||
obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ) += rk3399_dmc.o
|
||||
obj-$(CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ) += sun8i-a33-mbus.o
|
||||
obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
From ce6d3614888e6358466f0e84e248177a6bca5258 Mon Sep 17 00:00:00 2001
|
||||
From: Tang Yun ping <typ@rock-chips.com>
|
||||
Date: Thu, 4 May 2017 20:49:58 +0800
|
||||
Subject: [PATCH] clk: rockchip: support setting ddr clock via SIP Version 2
|
||||
APIs
|
||||
|
||||
commit 764e893ee82321938fc6f4349e9e7caf06a04410 rockchip.
|
||||
|
||||
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
|
||||
Signed-off-by: hmz007 <hmz007@gmail.com>
|
||||
---
|
||||
drivers/clk/rockchip/clk-ddr.c | 130 ++++++++++++++++++++++++++++
|
||||
drivers/clk/rockchip/clk-rk3328.c | 7 +-
|
||||
drivers/clk/rockchip/clk.h | 3 +-
|
||||
include/soc/rockchip/rockchip_sip.h | 11 +++
|
||||
4 files changed, 147 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/clk/rockchip/clk-ddr.c
|
||||
+++ b/drivers/clk/rockchip/clk-ddr.c
|
||||
@@ -87,6 +87,133 @@ static const struct clk_ops rockchip_ddr
|
||||
.get_parent = rockchip_ddrclk_get_parent,
|
||||
};
|
||||
|
||||
+/* See v4.4/include/dt-bindings/display/rk_fb.h */
|
||||
+#define SCREEN_NULL 0
|
||||
+#define SCREEN_HDMI 6
|
||||
+
|
||||
+static inline int rk_drm_get_lcdc_type(void)
|
||||
+{
|
||||
+ return SCREEN_NULL;
|
||||
+}
|
||||
+
|
||||
+struct share_params {
|
||||
+ u32 hz;
|
||||
+ u32 lcdc_type;
|
||||
+ u32 vop;
|
||||
+ u32 vop_dclk_mode;
|
||||
+ u32 sr_idle_en;
|
||||
+ u32 addr_mcu_el3;
|
||||
+ /*
|
||||
+ * 1: need to wait flag1
|
||||
+ * 0: never wait flag1
|
||||
+ */
|
||||
+ u32 wait_flag1;
|
||||
+ /*
|
||||
+ * 1: need to wait flag1
|
||||
+ * 0: never wait flag1
|
||||
+ */
|
||||
+ u32 wait_flag0;
|
||||
+ u32 complt_hwirq;
|
||||
+ /* if need, add parameter after */
|
||||
+};
|
||||
+
|
||||
+struct rockchip_ddrclk_data {
|
||||
+ u32 inited_flag;
|
||||
+ void __iomem *share_memory;
|
||||
+};
|
||||
+
|
||||
+static struct rockchip_ddrclk_data ddr_data;
|
||||
+
|
||||
+static void rockchip_ddrclk_data_init(void)
|
||||
+{
|
||||
+ struct arm_smccc_res res;
|
||||
+
|
||||
+ arm_smccc_smc(ROCKCHIP_SIP_SHARE_MEM,
|
||||
+ 1, SHARE_PAGE_TYPE_DDR, 0,
|
||||
+ 0, 0, 0, 0, &res);
|
||||
+
|
||||
+ if (!res.a0) {
|
||||
+ ddr_data.share_memory = (void __iomem *)ioremap(res.a1, 1<<12);
|
||||
+ ddr_data.inited_flag = 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int rockchip_ddrclk_sip_set_rate_v2(struct clk_hw *hw,
|
||||
+ unsigned long drate,
|
||||
+ unsigned long prate)
|
||||
+{
|
||||
+ struct share_params *p;
|
||||
+ struct arm_smccc_res res;
|
||||
+
|
||||
+ if (!ddr_data.inited_flag)
|
||||
+ rockchip_ddrclk_data_init();
|
||||
+
|
||||
+ p = (struct share_params *)ddr_data.share_memory;
|
||||
+
|
||||
+ p->hz = drate;
|
||||
+ p->lcdc_type = rk_drm_get_lcdc_type();
|
||||
+ p->wait_flag1 = 1;
|
||||
+ p->wait_flag0 = 1;
|
||||
+
|
||||
+ arm_smccc_smc(ROCKCHIP_SIP_DRAM_FREQ,
|
||||
+ SHARE_PAGE_TYPE_DDR, 0,
|
||||
+ ROCKCHIP_SIP_CONFIG_DRAM_SET_RATE,
|
||||
+ 0, 0, 0, 0, &res);
|
||||
+
|
||||
+ if ((int)res.a1 == -6) {
|
||||
+ pr_err("%s: timeout, drate = %lumhz\n", __func__, drate/1000000);
|
||||
+ /* TODO: rockchip_dmcfreq_wait_complete(); */
|
||||
+ }
|
||||
+
|
||||
+ return res.a0;
|
||||
+}
|
||||
+
|
||||
+static unsigned long rockchip_ddrclk_sip_recalc_rate_v2
|
||||
+ (struct clk_hw *hw, unsigned long parent_rate)
|
||||
+{
|
||||
+ struct arm_smccc_res res;
|
||||
+
|
||||
+ arm_smccc_smc(ROCKCHIP_SIP_DRAM_FREQ,
|
||||
+ SHARE_PAGE_TYPE_DDR, 0,
|
||||
+ ROCKCHIP_SIP_CONFIG_DRAM_GET_RATE,
|
||||
+ 0, 0, 0, 0, &res);
|
||||
+ if (!res.a0)
|
||||
+ return res.a1;
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static long rockchip_ddrclk_sip_round_rate_v2(struct clk_hw *hw,
|
||||
+ unsigned long rate,
|
||||
+ unsigned long *prate)
|
||||
+{
|
||||
+ struct share_params *p;
|
||||
+ struct arm_smccc_res res;
|
||||
+
|
||||
+ if (!ddr_data.inited_flag)
|
||||
+ rockchip_ddrclk_data_init();
|
||||
+
|
||||
+ p = (struct share_params *)ddr_data.share_memory;
|
||||
+
|
||||
+ p->hz = rate;
|
||||
+
|
||||
+ arm_smccc_smc(ROCKCHIP_SIP_DRAM_FREQ,
|
||||
+ SHARE_PAGE_TYPE_DDR, 0,
|
||||
+ ROCKCHIP_SIP_CONFIG_DRAM_ROUND_RATE,
|
||||
+ 0, 0, 0, 0, &res);
|
||||
+ if (!res.a0)
|
||||
+ return res.a1;
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct clk_ops rockchip_ddrclk_sip_ops_v2 = {
|
||||
+ .recalc_rate = rockchip_ddrclk_sip_recalc_rate_v2,
|
||||
+ .set_rate = rockchip_ddrclk_sip_set_rate_v2,
|
||||
+ .round_rate = rockchip_ddrclk_sip_round_rate_v2,
|
||||
+ .get_parent = rockchip_ddrclk_get_parent,
|
||||
+};
|
||||
+
|
||||
struct clk *rockchip_clk_register_ddrclk(const char *name, int flags,
|
||||
const char *const *parent_names,
|
||||
u8 num_parents, int mux_offset,
|
||||
@@ -114,6 +241,9 @@ struct clk *rockchip_clk_register_ddrclk
|
||||
case ROCKCHIP_DDRCLK_SIP:
|
||||
init.ops = &rockchip_ddrclk_sip_ops;
|
||||
break;
|
||||
+ case ROCKCHIP_DDRCLK_SIP_V2:
|
||||
+ init.ops = &rockchip_ddrclk_sip_ops_v2;
|
||||
+ break;
|
||||
default:
|
||||
pr_err("%s: unsupported ddrclk type %d\n", __func__, ddr_flag);
|
||||
kfree(ddrclk);
|
||||
--- a/drivers/clk/rockchip/clk-rk3328.c
|
||||
+++ b/drivers/clk/rockchip/clk-rk3328.c
|
||||
@@ -315,9 +315,10 @@ static struct rockchip_clk_branch rk3328
|
||||
RK3328_CLKGATE_CON(14), 1, GFLAGS),
|
||||
|
||||
/* PD_DDR */
|
||||
- COMPOSITE(0, "clk_ddr", mux_ddrphy_p, CLK_IGNORE_UNUSED,
|
||||
- RK3328_CLKSEL_CON(3), 8, 2, MFLAGS, 0, 3, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
|
||||
- RK3328_CLKGATE_CON(0), 4, GFLAGS),
|
||||
+ COMPOSITE_DDRCLK(SCLK_DDRCLK, "sclk_ddrc", mux_ddrphy_p, 0,
|
||||
+ RK3328_CLKSEL_CON(3), 8, 2, 0, 3,
|
||||
+ ROCKCHIP_DDRCLK_SIP_V2),
|
||||
+
|
||||
GATE(0, "clk_ddrmsch", "clk_ddr", CLK_IGNORE_UNUSED,
|
||||
RK3328_CLKGATE_CON(18), 6, GFLAGS),
|
||||
GATE(0, "clk_ddrupctl", "clk_ddr", CLK_IGNORE_UNUSED,
|
||||
--- a/drivers/clk/rockchip/clk.h
|
||||
+++ b/drivers/clk/rockchip/clk.h
|
||||
@@ -568,7 +568,8 @@ struct clk *rockchip_clk_register_mmc(co
|
||||
* DDRCLK flags, including method of setting the rate
|
||||
* ROCKCHIP_DDRCLK_SIP: use SIP call to bl31 to change ddrclk rate.
|
||||
*/
|
||||
-#define ROCKCHIP_DDRCLK_SIP BIT(0)
|
||||
+#define ROCKCHIP_DDRCLK_SIP 0x01
|
||||
+#define ROCKCHIP_DDRCLK_SIP_V2 0x03
|
||||
|
||||
struct clk *rockchip_clk_register_ddrclk(const char *name, int flags,
|
||||
const char *const *parent_names,
|
||||
--- a/include/soc/rockchip/rockchip_sip.h
|
||||
+++ b/include/soc/rockchip/rockchip_sip.h
|
||||
@@ -16,5 +16,16 @@
|
||||
#define ROCKCHIP_SIP_CONFIG_DRAM_CLR_IRQ 0x06
|
||||
#define ROCKCHIP_SIP_CONFIG_DRAM_SET_PARAM 0x07
|
||||
#define ROCKCHIP_SIP_CONFIG_DRAM_SET_ODT_PD 0x08
|
||||
+#define ROCKCHIP_SIP_CONFIG_DRAM_GET_VERSION 0x08
|
||||
+
|
||||
+#define ROCKCHIP_SIP_SHARE_MEM 0x82000009
|
||||
+
|
||||
+/* Share mem page types */
|
||||
+typedef enum {
|
||||
+ SHARE_PAGE_TYPE_INVALID = 0,
|
||||
+ SHARE_PAGE_TYPE_UARTDBG,
|
||||
+ SHARE_PAGE_TYPE_DDR,
|
||||
+ SHARE_PAGE_TYPE_MAX,
|
||||
+} share_page_type_t;
|
||||
|
||||
#endif
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
From 4db93c6dad0c71750b86163df2fdb21c35f00d9a Mon Sep 17 00:00:00 2001
|
||||
From: hmz007 <hmz007@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 12:49:48 +0800
|
||||
Subject: [PATCH] PM / devfreq: rockchip-dfi: add more soc support
|
||||
|
||||
Signed-off-by: hmz007 <hmz007@gmail.com>
|
||||
---
|
||||
drivers/devfreq/event/rockchip-dfi.c | 20 ++++++++++++++++++++++++---
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
--- a/drivers/devfreq/event/rockchip-dfi.c
|
||||
+++ b/drivers/devfreq/event/rockchip-dfi.c
|
||||
@@ -44,6 +44,9 @@
|
||||
DDRMON_CTRL_LPDDR4 | \
|
||||
DDRMON_CTRL_LPDDR23)
|
||||
|
||||
+#define READ_DRAMTYPE_INFO(n) (((n) >> 13) & 0x7)
|
||||
+#define RK3328_GRF_OS_REG2 0x5d0
|
||||
+
|
||||
#define DDRMON_CH0_WR_NUM 0x20
|
||||
#define DDRMON_CH0_RD_NUM 0x24
|
||||
#define DDRMON_CH0_COUNT_NUM 0x28
|
||||
@@ -669,6 +672,22 @@ static int rockchip_ddr_perf_init(struct
|
||||
}
|
||||
#endif
|
||||
|
||||
+static int rk3328_dfi_init(struct rockchip_dfi *dfi)
|
||||
+{
|
||||
+ struct regmap *regmap_pmu = dfi->regmap_pmu;
|
||||
+ u32 val;
|
||||
+
|
||||
+ regmap_read(regmap_pmu, RK3328_GRF_OS_REG2, &val);
|
||||
+ dfi->ddr_type = READ_DRAMTYPE_INFO(val);
|
||||
+ dfi->channel_mask = BIT(0);
|
||||
+ dfi->max_channels = 1;
|
||||
+
|
||||
+ dfi->ddrmon_stride = 0x0;
|
||||
+ dfi->ddrmon_ctrl_single = true;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int rk3399_dfi_init(struct rockchip_dfi *dfi)
|
||||
{
|
||||
struct regmap *regmap_pmu = dfi->regmap_pmu;
|
||||
@@ -757,6 +776,7 @@ static int rk3588_dfi_init(struct rockch
|
||||
};
|
||||
|
||||
static const struct of_device_id rockchip_dfi_id_match[] = {
|
||||
+ { .compatible = "rockchip,rk3328-dfi", .data = rk3328_dfi_init },
|
||||
{ .compatible = "rockchip,rk3399-dfi", .data = rk3399_dfi_init },
|
||||
{ .compatible = "rockchip,rk3568-dfi", .data = rk3568_dfi_init },
|
||||
{ .compatible = "rockchip,rk3588-dfi", .data = rk3588_dfi_init },
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From f9ae6e992d3d9e80357fee7d65ba0fe2dd37ae1f Mon Sep 17 00:00:00 2001
|
||||
From: hmz007 <hmz007@gmail.com>
|
||||
Date: Tue, 19 Nov 2019 14:21:51 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: rk3328: add dfi node
|
||||
|
||||
Signed-off-by: hmz007 <hmz007@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 7 +++++++
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -1074,6 +1074,13 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ dfi: dfi@ff790000 {
|
||||
+ reg = <0x00 0xff790000 0x00 0x400>;
|
||||
+ compatible = "rockchip,rk3328-dfi";
|
||||
+ rockchip,pmu = <&grf>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
gic: interrupt-controller@ff811000 {
|
||||
compatible = "arm,gic-400";
|
||||
#interrupt-cells = <3>;
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "rk3328.dtsi"
|
||||
+#include "rk3328-dram-dmc.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi R2S";
|
||||
@@ -142,6 +143,10 @@
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
+&dfi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&display_subsystem {
|
||||
status = "disabled";
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include "rk3328.dtsi"
|
||||
+#include "rk3328-dram-dmc.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Xunlong Orange Pi R1 Plus";
|
||||
@@ -108,6 +109,10 @@
|
||||
cpu-supply = <&vdd_arm>;
|
||||
};
|
||||
|
||||
+&dfi {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&display_subsystem {
|
||||
status = "disabled";
|
||||
};
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
|
||||
@@ -14,6 +14,13 @@
|
||||
compatible = "xunlong,orangepi-r1-plus-lts", "rockchip,rk3328";
|
||||
};
|
||||
|
||||
+&dmc_opp_table {
|
||||
+ /delete-node/ opp-798000000;
|
||||
+ /delete-node/ opp-840000000;
|
||||
+ /delete-node/ opp-924000000;
|
||||
+ /delete-node/ opp-1056000000;
|
||||
+};
|
||||
+
|
||||
&gmac2io {
|
||||
phy-handle = <&yt8531c>;
|
||||
tx_delay = <0x19>;
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Leonidas P. Papadakos <papadakospan@gmail.com>
|
||||
Date: Fri, 1 Mar 2019 21:55:53 +0200
|
||||
Subject: [PATCH v2] arm64: dts: rockchip: add more cpu operating points for
|
||||
RK3328
|
||||
|
||||
This allows for greater max frequency on rk3328 boards,
|
||||
increasing performance.
|
||||
|
||||
It has been included in Armbian (a linux distibution for ARM boards)
|
||||
for a while now without any reported issues
|
||||
|
||||
https://github.com/armbian/build/blob/master/patch/kernel/rockchip64-default/enable-1392mhz-opp.patch
|
||||
https://github.com/armbian/build/blob/master/patch/kernel/rockchip64-default/enable-1512mhz-opp.patch
|
||||
|
||||
Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 15 +++++++++++++++
|
||||
1 files changed, 15 insertions(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
|
||||
@@ -171,6 +171,21 @@
|
||||
opp-microvolt = <1300000>;
|
||||
clock-latency-ns = <40000>;
|
||||
};
|
||||
+ opp-1392000000 {
|
||||
+ opp-hz = /bits/ 64 <1392000000>;
|
||||
+ opp-microvolt = <1350000>;
|
||||
+ clock-latency-ns = <40000>;
|
||||
+ };
|
||||
+ opp-1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ clock-latency-ns = <40000>;
|
||||
+ };
|
||||
+ opp-1608000000 {
|
||||
+ opp-hz = /bits/ 64 <1608000000>;
|
||||
+ opp-microvolt = <1450000>;
|
||||
+ clock-latency-ns = <40000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
analog_sound: analog-sound {
|
||||
@@ -63,13 +63,13 @@ func ClientProfileToMultiURLs(profile *pb.ClientProfile) (urls []string, err err
|
||||
return nil, fmt.Errorf("user name in profile %s is empty", profileName)
|
||||
}
|
||||
if !isSafeURLString(userName) {
|
||||
return nil, fmt.Errorf("user name %q in profile %s can't be safely encoded to URL. Only allow A-Z, a-z, 0-9, underscore _, and hyphen -", userName, profileName)
|
||||
return nil, fmt.Errorf(`user name %q in profile %s can't be safely encoded to URL. Only allow "A-Z", "a-z", "0-9", underscore "_", and hyphen "-"`, userName, profileName)
|
||||
}
|
||||
if password == "" {
|
||||
return nil, fmt.Errorf("password in profile %s is empty", profileName)
|
||||
}
|
||||
if !isSafeURLString(password) {
|
||||
return nil, fmt.Errorf("password %q in profile %s can't be safely encoded to URL. Only allow A-Z, a-z, 0-9, underscore _, and hyphen -", password, profileName)
|
||||
return nil, fmt.Errorf(`password %q in profile %s can't be safely encoded to URL. Only allow "A-Z", "a-z", "0-9", underscore "_", and hyphen "-"`, password, profileName)
|
||||
}
|
||||
if len(servers) == 0 {
|
||||
return nil, fmt.Errorf("profile %s has no server", profileName)
|
||||
|
||||
+45
-13
@@ -134,6 +134,13 @@ func RegisterClientCommands() {
|
||||
},
|
||||
clientImportConfigFunc,
|
||||
)
|
||||
RegisterCallback(
|
||||
[]string{"", "export", "config", "simple"},
|
||||
func(s []string) error {
|
||||
return unexpectedArgsError(s, 4)
|
||||
},
|
||||
clientExportConfigSimpleFunc,
|
||||
)
|
||||
RegisterCallback(
|
||||
[]string{"", "export", "config"},
|
||||
func(s []string) error {
|
||||
@@ -267,8 +274,8 @@ var clientHelpFunc = func(s []string) error {
|
||||
help: []string{"Test mieru client connection to the Internet via proxy server."},
|
||||
},
|
||||
{
|
||||
cmd: "apply config <FILE>",
|
||||
help: []string{"Apply client configuration from JSON file."},
|
||||
cmd: "apply config <JSON_FILE>",
|
||||
help: []string{"Apply client configuration from a file."},
|
||||
},
|
||||
{
|
||||
cmd: "describe config",
|
||||
@@ -276,11 +283,15 @@ var clientHelpFunc = func(s []string) error {
|
||||
},
|
||||
{
|
||||
cmd: "import config <URL>",
|
||||
help: []string{"Import client configuration from URL."},
|
||||
help: []string{"Import client configuration from a URL."},
|
||||
},
|
||||
{
|
||||
cmd: "export config simple",
|
||||
help: []string{"Export client configuration as URLs in simple format."},
|
||||
},
|
||||
{
|
||||
cmd: "export config",
|
||||
help: []string{"Export client configuration as URL."},
|
||||
help: []string{"Export client configuration as a URL."},
|
||||
},
|
||||
{
|
||||
cmd: "delete profile <PROFILE_NAME>",
|
||||
@@ -738,8 +749,7 @@ var clientTestFunc = func(s []string) error {
|
||||
}
|
||||
|
||||
var clientApplyConfigFunc = func(s []string) error {
|
||||
_, err := appctl.LoadClientConfig()
|
||||
if err == stderror.ErrFileNotExist {
|
||||
if _, err := appctl.LoadClientConfig(); err == stderror.ErrFileNotExist {
|
||||
if err = appctl.StoreClientConfig(&appctlpb.ClientConfig{}); err != nil {
|
||||
return fmt.Errorf(stderror.StoreClientConfigFailedErr, err)
|
||||
}
|
||||
@@ -748,8 +758,7 @@ var clientApplyConfigFunc = func(s []string) error {
|
||||
}
|
||||
|
||||
var clientDescribeConfigFunc = func(s []string) error {
|
||||
_, err := appctl.LoadClientConfig()
|
||||
if err == stderror.ErrFileNotExist {
|
||||
if _, err := appctl.LoadClientConfig(); err == stderror.ErrFileNotExist {
|
||||
if err = appctl.StoreClientConfig(&appctlpb.ClientConfig{}); err != nil {
|
||||
return fmt.Errorf(stderror.StoreClientConfigFailedErr, err)
|
||||
}
|
||||
@@ -763,8 +772,7 @@ var clientDescribeConfigFunc = func(s []string) error {
|
||||
}
|
||||
|
||||
var clientImportConfigFunc = func(s []string) error {
|
||||
_, err := appctl.LoadClientConfig()
|
||||
if err == stderror.ErrFileNotExist {
|
||||
if _, err := appctl.LoadClientConfig(); err == stderror.ErrFileNotExist {
|
||||
if err = appctl.StoreClientConfig(&appctlpb.ClientConfig{}); err != nil {
|
||||
return fmt.Errorf(stderror.StoreClientConfigFailedErr, err)
|
||||
}
|
||||
@@ -772,11 +780,35 @@ var clientImportConfigFunc = func(s []string) error {
|
||||
return appctl.ApplyURLClientConfig(s[3])
|
||||
}
|
||||
|
||||
var clientExportConfigSimpleFunc = func(s []string) error {
|
||||
config, err := appctl.LoadClientConfig()
|
||||
if err != nil {
|
||||
if err == stderror.ErrFileNotExist {
|
||||
return fmt.Errorf(stderror.ClientConfigNotExist)
|
||||
} else {
|
||||
return fmt.Errorf(stderror.GetClientConfigFailedErr, err)
|
||||
}
|
||||
}
|
||||
for _, profile := range config.GetProfiles() {
|
||||
urls, err := appctl.ClientProfileToMultiURLs(profile)
|
||||
if err != nil {
|
||||
log.Errorf("%v", err)
|
||||
} else {
|
||||
for _, url := range urls {
|
||||
log.Infof("%s", url)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var clientExportConfigFunc = func(s []string) error {
|
||||
_, err := appctl.LoadClientConfig()
|
||||
if err == stderror.ErrFileNotExist {
|
||||
if err = appctl.StoreClientConfig(&appctlpb.ClientConfig{}); err != nil {
|
||||
return fmt.Errorf(stderror.StoreClientConfigFailedErr, err)
|
||||
if err != nil {
|
||||
if err == stderror.ErrFileNotExist {
|
||||
return fmt.Errorf(stderror.ClientConfigNotExist)
|
||||
} else {
|
||||
return fmt.Errorf(stderror.GetClientConfigFailedErr, err)
|
||||
}
|
||||
}
|
||||
out, err := appctl.GetURLClientConfig()
|
||||
|
||||
@@ -219,8 +219,8 @@ var serverHelpFunc = func(s []string) error {
|
||||
help: []string{"Check mita server proxy service status."},
|
||||
},
|
||||
{
|
||||
cmd: "apply config <FILE>",
|
||||
help: []string{"Apply server configuration from JSON file."},
|
||||
cmd: "apply config <JSON_FILE>",
|
||||
help: []string{"Apply server configuration from a file."},
|
||||
},
|
||||
{
|
||||
cmd: "describe config",
|
||||
|
||||
@@ -435,7 +435,7 @@ func (s *Session) writeChunk(b []byte) (n int, err error) {
|
||||
if len(b) > fragmentSize {
|
||||
nFragment = (len(b)-1)/fragmentSize + 1
|
||||
}
|
||||
for s.sendQueue.Remaining() < nFragment {
|
||||
for s.sendQueue.Remaining() <= nFragment { // reserve one slot for Close()
|
||||
select {
|
||||
case <-s.closedChan:
|
||||
return 0, io.EOF
|
||||
|
||||
@@ -48,6 +48,8 @@ sleep 1
|
||||
sleep 1
|
||||
./mieru delete socks5 authentication
|
||||
sleep 1
|
||||
./mieru export config simple
|
||||
sleep 1
|
||||
./mieru export config > client.url.txt
|
||||
rm ~/.config/mieru/client.conf.pb
|
||||
echo "mieru client config before import:"
|
||||
|
||||
@@ -143,12 +143,16 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
||||
end
|
||||
local function get_write(shunt_node_id, option)
|
||||
return function(self, section, value)
|
||||
m:set(shunt_node_id, option, value)
|
||||
if s.fields["tcp_node"]:formvalue(section) == shunt_node_id then
|
||||
m:set(shunt_node_id, option, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local function get_remove(shunt_node_id, option)
|
||||
return function(self, section)
|
||||
m:del(shunt_node_id, option)
|
||||
if s.fields["tcp_node"]:formvalue(section) == shunt_node_id then
|
||||
m:del(shunt_node_id, option)
|
||||
end
|
||||
end
|
||||
end
|
||||
if #normal_list > 0 then
|
||||
|
||||
@@ -219,7 +219,14 @@ end
|
||||
|
||||
function is_install(package)
|
||||
if package and #package > 0 then
|
||||
return sys.call(string.format('opkg list-installed | grep "%s" > /dev/null 2>&1', package)) == 0
|
||||
local file_path = "/usr/lib/opkg/info"
|
||||
local file_ext = ".control"
|
||||
local has = sys.call("[ -d " .. file_path .. " ]")
|
||||
if has == 0 then
|
||||
file_path = "/lib/apk/packages"
|
||||
file_ext = ".list"
|
||||
end
|
||||
return sys.call(string.format('[ -s "%s/%s%s" ]', file_path, package, file_ext)) == 0
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -26,18 +26,12 @@ table td, .table .td {
|
||||
}
|
||||
|
||||
._now_use {
|
||||
background: #5e72e445 !important;
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.ping a:hover{
|
||||
text-decoration : underline;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
._now_use {
|
||||
background: #4a90e2 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -217,13 +211,12 @@ table td, .table .td {
|
||||
if (id) {
|
||||
var dom = document.getElementById("cbi-passwall-" + id);
|
||||
if (dom) {
|
||||
dom.classList.add("_now_use");
|
||||
dom.title = "当前TCP节点";
|
||||
dom.title = "当前使用的 TCP 节点";
|
||||
//var v = "<a style='color: red'>当前TCP节点:</a>" + document.getElementById("cbid.passwall." + id + ".remarks").value;
|
||||
//document.getElementById("cbi-passwall-" + id + "-remarks").innerHTML = v;
|
||||
var tds = dom.getElementsByTagName("td")
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
tds[j].classList.add("_now_use");
|
||||
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
|
||||
if (dom_remarks) {
|
||||
dom_remarks.classList.add("_now_use");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,11 +224,14 @@ table td, .table .td {
|
||||
if (id) {
|
||||
var dom = document.getElementById("cbi-passwall-" + id);
|
||||
if (dom) {
|
||||
dom.classList.add("_now_use");
|
||||
dom.title = "当前UDP节点";
|
||||
var tds = dom.getElementsByTagName("td")
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
tds[j].classList.add("_now_use");
|
||||
if (result["TCP"] == result["UDP"]) {
|
||||
dom.title = "当前使用的 TCP/UDP 节点";
|
||||
} else {
|
||||
dom.title = "当前使用的 UDP 节点";
|
||||
}
|
||||
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
|
||||
if (dom_remarks) {
|
||||
dom_remarks.classList.add("_now_use");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1589,7 +1589,9 @@ start_dns() {
|
||||
[ "$(expr $dnsmasq_version \>= 2.87)" == 0 ] && echolog "Dnsmasq版本低于2.87,有可能无法正常使用!!!"
|
||||
}
|
||||
|
||||
local DNSMASQ_TUN_DNS=$(get_first_dns TUN_DNS 53 | sed 's/:/#/g')
|
||||
local RUN_NEW_DNSMASQ=1
|
||||
RUN_NEW_DNSMASQ=${DNS_REDIRECT}
|
||||
if [ "${RUN_NEW_DNSMASQ}" == "0" ]; then
|
||||
#The old logic will be removed in the future.
|
||||
#Run a copy dnsmasq instance, DNS hijack that don't need a proxy devices.
|
||||
@@ -1605,7 +1607,7 @@ start_dns() {
|
||||
#Modify the default dnsmasq service
|
||||
lua $APP_PATH/helper_dnsmasq.lua stretch
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${TUN_DNS} \
|
||||
-DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${fakedns:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
@@ -1617,7 +1619,7 @@ start_dns() {
|
||||
GLOBAL_DNSMASQ_CONF=${GLOBAL_ACL_PATH}/dnsmasq.conf
|
||||
GLOBAL_DNSMASQ_CONF_PATH=${GLOBAL_ACL_PATH}/dnsmasq.d
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-LISTEN_PORT ${GLOBAL_DNSMASQ_PORT} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${TUN_DNS} \
|
||||
-LISTEN_PORT ${GLOBAL_DNSMASQ_PORT} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${fakedns:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
@@ -1684,8 +1686,7 @@ acl_app() {
|
||||
socks_port=11100
|
||||
redir_port=11200
|
||||
dns_port=11300
|
||||
dnsmasq_port=11400
|
||||
[ -n "${GLOBAL_DNSMASQ_PORT}" ] && dnsmasq_port=$(get_new_port $GLOBAL_DNSMASQ_PORT)
|
||||
dnsmasq_port=${GLOBAL_DNSMASQ_PORT:-11400}
|
||||
chinadns_port=11500
|
||||
for item in $items; do
|
||||
sid=$(uci -q show "${CONFIG}.${item}" | grep "=acl_rule" | awk -F '=' '{print $1}' | awk -F '.' '{print $2}')
|
||||
@@ -1749,7 +1750,6 @@ acl_app() {
|
||||
|
||||
[ -n "$tcp_node" ] && {
|
||||
local GLOBAL_TCP_NODE=$(get_cache_var "ACL_GLOBAL_TCP_node")
|
||||
echolog "${GLOBAL_TCP_NODE}"
|
||||
[ -n "${GLOBAL_TCP_NODE}" ] && GLOBAL_TCP_redir_port=$(get_cache_var "ACL_GLOBAL_TCP_redir_port")
|
||||
if [ "$tcp_node" = "default" ]; then
|
||||
if [ -n "${GLOBAL_TCP_NODE}" ]; then
|
||||
@@ -2001,8 +2001,10 @@ start() {
|
||||
|
||||
if [ "$ENABLED_DEFAULT_ACL" == 1 ] || [ "$ENABLED_ACLS" == 1 ]; then
|
||||
[ "$(uci -q get dhcp.@dnsmasq[0].dns_redirect)" == "1" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0' 2>/dev/null
|
||||
uci commit dhcp 2>/dev/null
|
||||
uci -q set ${CONFIG}.@global[0].dnsmasq_dns_redirect='1'
|
||||
uci -q commit ${CONFIG}
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0'
|
||||
uci -q commit dhcp
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
@@ -2045,11 +2047,23 @@ stop() {
|
||||
source $APP_PATH/helper_smartdns.sh del
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF_PATH
|
||||
[ -z "$(get_cache_var "ACL_default_dns_port")" ] && lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
[ "1" = "1" ] && {
|
||||
#restore logic
|
||||
bak_dnsmasq_dns_redirect=$(config_t_get global dnsmasq_dns_redirect)
|
||||
[ -n "${bak_dnsmasq_dns_redirect}" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect="${bak_dnsmasq_dns_redirect}"
|
||||
uci -q commit dhcp
|
||||
uci -q delete ${CONFIG}.@global[0].dnsmasq_dns_redirect
|
||||
uci -q commit ${CONFIG}
|
||||
}
|
||||
if [ -z "$(get_cache_var "ACL_default_dns_port")" ] || [ -n "${bak_dnsmasq_dns_redirect}" ]; then
|
||||
lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
fi
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
}
|
||||
rm -rf $TMP_PATH
|
||||
rm -rf /tmp/lock/${CONFIG}_socks_auto_switch*
|
||||
echolog "清空并关闭相关程序和缓存完成。"
|
||||
@@ -2108,6 +2122,7 @@ DNS_CACHE=0
|
||||
REMOTE_DNS=$(config_t_get global remote_dns 1.1.1.1:53 | sed 's/#/:/g' | sed -E 's/\:([^:]+)$/#\1/g')
|
||||
USE_DEFAULT_DNS=$(config_t_get global use_default_dns direct)
|
||||
FILTER_PROXY_IPV6=$(config_t_get global filter_proxy_ipv6 0)
|
||||
DNS_REDIRECT=$(config_t_get global dns_redirect 1)
|
||||
dns_listen_port=${DNS_PORT}
|
||||
|
||||
REDIRECT_LIST="socks ss ss-rust ssr sing-box xray trojan-plus naiveproxy hysteria2"
|
||||
|
||||
@@ -329,6 +329,7 @@ load_acl() {
|
||||
$ip6t_n -A PSW_DNS $(comment "$remarks") -p udp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect} 2>/dev/null
|
||||
$ipt_n -A PSW_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect}
|
||||
$ip6t_n -A PSW_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect} 2>/dev/null
|
||||
[ -z "$(get_cache_var "ACL_${sid}_tcp_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
fi
|
||||
|
||||
[ -n "$tcp_port" -o -n "$udp_port" ] && {
|
||||
@@ -1038,10 +1039,10 @@ add_firewall_rule() {
|
||||
|
||||
if ([ -n "$TCP_NODE" ] && [ -n "${LOCALHOST_TCP_PROXY_MODE}" ]) || ([ -n "$UDP_NODE" ] && [ -n "${LOCALHOST_UDP_PROXY_MODE}" ]); then
|
||||
[ -n "$DNS_REDIRECT_PORT" ] && {
|
||||
$ipt_n -A OUTPUT $(comment "PSW") -p udp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT
|
||||
$ip6t_n -A OUTPUT $(comment "PSW") -p udp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT 2>/dev/null
|
||||
$ipt_n -A OUTPUT $(comment "PSW") -p tcp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT
|
||||
$ip6t_n -A OUTPUT $(comment "PSW") -p tcp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT 2>/dev/null
|
||||
$ipt_n -A OUTPUT $(comment "PSW_DNS") -p udp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT
|
||||
$ip6t_n -A OUTPUT $(comment "PSW_DNS") -p udp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT 2>/dev/null
|
||||
$ipt_n -A OUTPUT $(comment "PSW_DNS") -p tcp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT
|
||||
$ip6t_n -A OUTPUT $(comment "PSW_DNS") -p tcp -o lo --dport 53 -j REDIRECT --to-ports $DNS_REDIRECT_PORT 2>/dev/null
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
@@ -379,6 +379,7 @@ load_acl() {
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS ip protocol tcp ${_ipt_source} tcp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS meta l4proto udp ${_ipt_source} udp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS meta l4proto tcp ${_ipt_source} tcp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
[ -z "$(get_cache_var "ACL_${sid}_tcp_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
fi
|
||||
|
||||
[ -n "$tcp_port" -o -n "$udp_port" ] && {
|
||||
@@ -1096,10 +1097,10 @@ add_firewall_rule() {
|
||||
|
||||
if ([ -n "$TCP_NODE" ] && [ -n "${LOCALHOST_TCP_PROXY_MODE}" ]) || ([ -n "$UDP_NODE" ] && [ -n "${LOCALHOST_UDP_PROXY_MODE}" ]); then
|
||||
[ -n "$DNS_REDIRECT_PORT" ] && {
|
||||
nft "add rule $NFTABLE_NAME nat_output ip protocol udp oif lo udp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW\""
|
||||
nft "add rule $NFTABLE_NAME nat_output ip protocol tcp oif lo tcp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW\""
|
||||
nft "add rule $NFTABLE_NAME nat_output meta l4proto udp oif lo udp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW\""
|
||||
nft "add rule $NFTABLE_NAME nat_output meta l4proto tcp oif lo tcp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW\""
|
||||
nft "add rule $NFTABLE_NAME nat_output ip protocol udp oif lo udp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW_DNS\""
|
||||
nft "add rule $NFTABLE_NAME nat_output ip protocol tcp oif lo tcp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW_DNS\""
|
||||
nft "add rule $NFTABLE_NAME nat_output meta l4proto udp oif lo udp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW_DNS\""
|
||||
nft "add rule $NFTABLE_NAME nat_output meta l4proto tcp oif lo tcp dport 53 counter redirect to :$DNS_REDIRECT_PORT comment \"PSW_DNS\""
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=24.12.19
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=24.12.21
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \
|
||||
|
||||
@@ -91,12 +91,16 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
|
||||
end
|
||||
local function get_write(shunt_node_id, option)
|
||||
return function(self, section, value)
|
||||
m:set(shunt_node_id, option, value)
|
||||
if s.fields["node"]:formvalue(section) == shunt_node_id then
|
||||
m:set(shunt_node_id, option, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
local function get_remove(shunt_node_id, option)
|
||||
return function(self, section)
|
||||
m:del(shunt_node_id, option)
|
||||
if s.fields["node"]:formvalue(section) == shunt_node_id then
|
||||
m:del(shunt_node_id, option)
|
||||
end
|
||||
end
|
||||
end
|
||||
if #normal_list > 0 then
|
||||
|
||||
@@ -43,7 +43,7 @@ table td, .table .td {
|
||||
}
|
||||
|
||||
._now_use {
|
||||
background: #94e1ff !important;
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.ping a:hover{
|
||||
@@ -227,13 +227,12 @@ table td, .table .td {
|
||||
if (id) {
|
||||
var dom = document.getElementById("cbi-passwall2-" + id);
|
||||
if (dom) {
|
||||
dom.classList.add("_now_use");
|
||||
dom.title = "当前节点";
|
||||
dom.title = "当前使用的节点";
|
||||
//var v = "<a style='color: red'>当前节点:</a>" + document.getElementById("cbid.passwall2." + id + ".remarks").value;
|
||||
//document.getElementById("cbi-passwall2-" + id + "-remarks").innerHTML = v;
|
||||
var tds = dom.getElementsByTagName("td")
|
||||
for (var j = 0; j < tds.length; j++) {
|
||||
tds[j].classList.add("_now_use");
|
||||
var dom_remarks = document.getElementById("cbi-passwall2-" + id + "-remarks");
|
||||
if (dom_remarks) {
|
||||
dom_remarks.classList.add("_now_use");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,9 +774,33 @@ run_global() {
|
||||
|
||||
${run_func} $V2RAY_ARGS
|
||||
|
||||
GLOBAL_DNSMASQ_PORT=$(get_new_port 11400)
|
||||
run_copy_dnsmasq flag="default" listen_port=$GLOBAL_DNSMASQ_PORT tun_dns="${TUN_DNS}"
|
||||
DNS_REDIRECT_PORT=${GLOBAL_DNSMASQ_PORT}
|
||||
local RUN_NEW_DNSMASQ=1
|
||||
RUN_NEW_DNSMASQ=${DNS_REDIRECT}
|
||||
if [ "${RUN_NEW_DNSMASQ}" == "0" ]; then
|
||||
#The old logic will be removed in the future.
|
||||
#Run a copy dnsmasq instance, DNS hijack that don't need a proxy devices.
|
||||
[ "1" = "0" ] && {
|
||||
DIRECT_DNSMASQ_PORT=$(get_new_port 11400)
|
||||
DIRECT_DNSMASQ_CONF=${GLOBAL_ACL_PATH}/direct_dnsmasq.conf
|
||||
lua $APP_PATH/helper_dnsmasq.lua copy_instance -LISTEN_PORT ${DIRECT_DNSMASQ_PORT} -DNSMASQ_CONF ${DIRECT_DNSMASQ_CONF}
|
||||
ln_run "$(first_type dnsmasq)" "dnsmasq_direct" "/dev/null" -C ${DIRECT_DNSMASQ_CONF} -x ${GLOBAL_ACL_PATH}/direct_dnsmasq.pid
|
||||
set_cache_var "DIRECT_DNSMASQ_PORT" "${DIRECT_DNSMASQ_PORT}"
|
||||
}
|
||||
|
||||
#Rewrite the default DNS service configuration
|
||||
#Modify the default dnsmasq service
|
||||
lua $APP_PATH/helper_dnsmasq.lua stretch
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-DEFAULT_DNS ${AUTO_DNS} -LOCAL_DNS ${LOCAL_DNS:-${AUTO_DNS}} -TUN_DNS ${TUN_DNS} \
|
||||
-NFTFLAG ${nftflag:-0} \
|
||||
-NO_LOGIC_LOG ${NO_LOGIC_LOG:-0}
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
else
|
||||
#Run a copy dnsmasq instance, DNS hijack for that need proxy devices.
|
||||
GLOBAL_DNSMASQ_PORT=$(get_new_port 11400)
|
||||
run_copy_dnsmasq flag="default" listen_port=$GLOBAL_DNSMASQ_PORT tun_dns="${TUN_DNS}"
|
||||
DNS_REDIRECT_PORT=${GLOBAL_DNSMASQ_PORT}
|
||||
fi
|
||||
|
||||
set_cache_var "ACL_GLOBAL_node" "$NODE"
|
||||
set_cache_var "ACL_GLOBAL_redir_port" "$REDIR_PORT"
|
||||
@@ -1228,8 +1252,10 @@ start() {
|
||||
|
||||
if [ "$ENABLED_DEFAULT_ACL" == 1 ] || [ "$ENABLED_ACLS" == 1 ]; then
|
||||
[ "$(uci -q get dhcp.@dnsmasq[0].dns_redirect)" == "1" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0' 2>/dev/null
|
||||
uci commit dhcp 2>/dev/null
|
||||
uci -q set ${CONFIG}.@global[0].dnsmasq_dns_redirect='1'
|
||||
uci -q commit ${CONFIG}
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0'
|
||||
uci -q commit dhcp
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
@@ -1238,11 +1264,11 @@ start() {
|
||||
set_cache_var "USE_TABLES" "$USE_TABLES"
|
||||
if [ "$ENABLED_DEFAULT_ACL" == 1 ] || [ "$ENABLED_ACLS" == 1 ]; then
|
||||
bridge_nf_ipt=$(sysctl -e -n net.bridge.bridge-nf-call-iptables)
|
||||
set_cache_var "origin_bridge_nf_ipt" "$bridge_nf_ipt"
|
||||
set_cache_var "bak_bridge_nf_ipt" "$bridge_nf_ipt"
|
||||
sysctl -w net.bridge.bridge-nf-call-iptables=0 >/dev/null 2>&1
|
||||
[ "$PROXY_IPV6" == "1" ] && {
|
||||
bridge_nf_ip6t=$(sysctl -e -n net.bridge.bridge-nf-call-ip6tables)
|
||||
set_cache_var "origin_bridge_nf_ip6t" "$bridge_nf_ip6t"
|
||||
set_cache_var "bak_bridge_nf_ip6t" "$bridge_nf_ip6t"
|
||||
sysctl -w net.bridge.bridge-nf-call-ip6tables=0 >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
@@ -1261,10 +1287,25 @@ stop() {
|
||||
unset V2RAY_LOCATION_ASSET
|
||||
unset XRAY_LOCATION_ASSET
|
||||
stop_crontab
|
||||
origin_bridge_nf_ipt=$(get_cache_var "origin_bridge_nf_ipt")
|
||||
[ -n "${origin_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${origin_bridge_nf_ipt} >/dev/null 2>&1
|
||||
origin_bridge_nf_ip6t=$(get_cache_var "origin_bridge_nf_ip6t")
|
||||
[ -n "${origin_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${origin_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF_PATH
|
||||
[ "1" = "1" ] && {
|
||||
#restore logic
|
||||
bak_dnsmasq_dns_redirect=$(config_t_get global dnsmasq_dns_redirect)
|
||||
[ -n "${bak_dnsmasq_dns_redirect}" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect="${bak_dnsmasq_dns_redirect}"
|
||||
uci -q commit dhcp
|
||||
uci -q delete ${CONFIG}.@global[0].dnsmasq_dns_redirect
|
||||
uci -q commit ${CONFIG}
|
||||
}
|
||||
if [ -z "$(get_cache_var "ACL_default_dns_port")" ] || [ -n "${bak_dnsmasq_dns_redirect}" ]; then
|
||||
lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
fi
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
}
|
||||
rm -rf $TMP_PATH
|
||||
rm -rf /tmp/lock/${CONFIG}_socks_auto_switch*
|
||||
echolog "清空并关闭相关程序和缓存完成。"
|
||||
@@ -1299,6 +1340,7 @@ REMOTE_FAKEDNS=$(config_t_get global remote_fakedns '0')
|
||||
REMOTE_DNS_QUERY_STRATEGY=$(config_t_get global remote_dns_query_strategy UseIPv4)
|
||||
WRITE_IPSET_DIRECT=$(config_t_get global write_ipset_direct 1)
|
||||
DNS_CACHE=$(config_t_get global dns_cache 1)
|
||||
DNS_REDIRECT=$(config_t_get global dns_redirect 1)
|
||||
|
||||
RESOLVFILE=/tmp/resolv.conf.d/resolv.conf.auto
|
||||
[ -f "${RESOLVFILE}" ] && [ -s "${RESOLVFILE}" ] || RESOLVFILE=/tmp/resolv.conf.auto
|
||||
@@ -1311,6 +1353,21 @@ DEFAULT_DNS=$(uci show dhcp.@dnsmasq[0] | grep "\.server=" | awk -F '=' '{print
|
||||
[ -z "${DEFAULT_DNS}" ] && DEFAULT_DNS=$(echo -n $ISP_DNS | tr ' ' '\n' | head -2 | tr '\n' ',')
|
||||
AUTO_DNS=${DEFAULT_DNS:-119.29.29.29}
|
||||
|
||||
DNSMASQ_CONF_DIR=/tmp/dnsmasq.d
|
||||
TMP_DNSMASQ_PATH=${DNSMASQ_CONF_DIR}/${CONFIG}
|
||||
DEFAULT_DNSMASQ_CFGID="$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')"
|
||||
if [ -f "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID" ]; then
|
||||
DNSMASQ_CONF_DIR="$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID")"
|
||||
if [ -n "$DNSMASQ_CONF_DIR" ]; then
|
||||
DNSMASQ_CONF_DIR=${DNSMASQ_CONF_DIR%*/}
|
||||
TMP_DNSMASQ_PATH=${DNSMASQ_CONF_DIR}/${CONFIG}
|
||||
else
|
||||
DNSMASQ_CONF_DIR="/tmp/dnsmasq.d"
|
||||
fi
|
||||
fi
|
||||
GLOBAL_DNSMASQ_CONF=${DNSMASQ_CONF_DIR}/dnsmasq-${CONFIG}.conf
|
||||
GLOBAL_DNSMASQ_CONF_PATH=${TMP_DNSMASQ_PATH}
|
||||
|
||||
PROXY_IPV6=$(config_t_get global_forwarding ipv6_tproxy 0)
|
||||
|
||||
XRAY_BIN=$(first_type $(config_t_get global_app xray_file) xray)
|
||||
|
||||
@@ -394,6 +394,7 @@ load_acl() {
|
||||
$ip6t_n -A PSW2_DNS $(comment "$remarks") -p udp ${_ipt_source} --dport 53 -j REDIRECT --to-ports $dns_redirect_port 2>/dev/null
|
||||
$ipt_n -A PSW2_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports $dns_redirect_port
|
||||
$ip6t_n -A PSW2_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports $dns_redirect_port 2>/dev/null
|
||||
[ -z "$(get_cache_var "ACL_${sid}_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
else
|
||||
$ipt_n -A PSW2_DNS $(comment "$remarks") -p udp ${_ipt_source} --dport 53 -j RETURN
|
||||
$ip6t_n -A PSW2_DNS $(comment "$remarks") -p udp ${_ipt_source} --dport 53 -j RETURN 2>/dev/null
|
||||
|
||||
@@ -440,6 +440,7 @@ load_acl() {
|
||||
nft "add rule $NFTABLE_NAME PSW2_DNS ip protocol tcp ${_ipt_source} tcp dport 53 counter redirect to :$dns_redirect_port comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW2_DNS meta l4proto udp ${_ipt_source} udp dport 53 counter redirect to :$dns_redirect_port comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW2_DNS meta l4proto tcp ${_ipt_source} tcp dport 53 counter redirect to :$dns_redirect_port comment \"$remarks\""
|
||||
[ -z "$(get_cache_var "ACL_${sid}_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
}
|
||||
else
|
||||
nft "add rule $NFTABLE_NAME PSW2_DNS ip protocol udp ${_ipt_source} udp dport 53 counter return comment \"$remarks\""
|
||||
|
||||
@@ -177,10 +177,14 @@ func selectInterfaces(networkManager adapter.NetworkManager, strategy C.NetworkS
|
||||
case C.NetworkStrategyDefault:
|
||||
if len(interfaceType) == 0 {
|
||||
defaultIf := networkManager.InterfaceMonitor().DefaultInterface()
|
||||
for _, iif := range interfaces {
|
||||
if iif.Index == defaultIf.Index {
|
||||
primaryInterfaces = append(primaryInterfaces, iif)
|
||||
if defaultIf != nil {
|
||||
for _, iif := range interfaces {
|
||||
if iif.Index == defaultIf.Index {
|
||||
primaryInterfaces = append(primaryInterfaces, iif)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
primaryInterfaces = interfaces
|
||||
}
|
||||
} else {
|
||||
primaryInterfaces = common.Filter(interfaces, func(it adapter.NetworkInterface) bool {
|
||||
@@ -198,11 +202,15 @@ func selectInterfaces(networkManager adapter.NetworkManager, strategy C.NetworkS
|
||||
case C.NetworkStrategyFallback:
|
||||
if len(interfaceType) == 0 {
|
||||
defaultIf := networkManager.InterfaceMonitor().DefaultInterface()
|
||||
for _, iif := range interfaces {
|
||||
if iif.Index == defaultIf.Index {
|
||||
primaryInterfaces = append(primaryInterfaces, iif)
|
||||
break
|
||||
if defaultIf != nil {
|
||||
for _, iif := range interfaces {
|
||||
if iif.Index == defaultIf.Index {
|
||||
primaryInterfaces = append(primaryInterfaces, iif)
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
primaryInterfaces = interfaces
|
||||
}
|
||||
} else {
|
||||
primaryInterfaces = common.Filter(interfaces, func(it adapter.NetworkInterface) bool {
|
||||
|
||||
@@ -55,15 +55,15 @@ func isGeositeDNSRule(rule option.DefaultDNSRule) bool {
|
||||
}
|
||||
|
||||
func isProcessRule(rule option.DefaultRule) bool {
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
|
||||
}
|
||||
|
||||
func isProcessDNSRule(rule option.DefaultDNSRule) bool {
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0 || len(rule.User) > 0 || len(rule.UserID) > 0
|
||||
}
|
||||
|
||||
func isProcessHeadlessRule(rule option.DefaultHeadlessRule) bool {
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.PackageName) > 0
|
||||
return len(rule.ProcessName) > 0 || len(rule.ProcessPath) > 0 || len(rule.ProcessPathRegex) > 0 || len(rule.PackageName) > 0
|
||||
}
|
||||
|
||||
func notPrivateNode(code string) bool {
|
||||
|
||||
@@ -219,7 +219,14 @@ end
|
||||
|
||||
function is_install(package)
|
||||
if package and #package > 0 then
|
||||
return sys.call(string.format('opkg list-installed | grep "%s" > /dev/null 2>&1', package)) == 0
|
||||
local file_path = "/usr/lib/opkg/info"
|
||||
local file_ext = ".control"
|
||||
local has = sys.call("[ -d " .. file_path .. " ]")
|
||||
if has == 0 then
|
||||
file_path = "/lib/apk/packages"
|
||||
file_ext = ".list"
|
||||
end
|
||||
return sys.call(string.format('[ -s "%s/%s%s" ]', file_path, package, file_ext)) == 0
|
||||
end
|
||||
return false
|
||||
end
|
||||
@@ -1066,7 +1073,7 @@ end
|
||||
function get_version()
|
||||
local version = sys.exec("opkg list-installed luci-app-passwall 2>/dev/null | awk '{print $3}'")
|
||||
if not version or #version == 0 then
|
||||
version = sys.exec("apk info luci-app-passwall 2>/dev/null | awk 'NR == 1 {print $1}' | cut -d'-' -f4-")
|
||||
version = sys.exec("apk info -L luci-app-passwall 2>/dev/null | awk 'NR == 1 {print $1}' | cut -d'-' -f4-")
|
||||
end
|
||||
return version or ""
|
||||
end
|
||||
|
||||
@@ -1589,7 +1589,9 @@ start_dns() {
|
||||
[ "$(expr $dnsmasq_version \>= 2.87)" == 0 ] && echolog "Dnsmasq版本低于2.87,有可能无法正常使用!!!"
|
||||
}
|
||||
|
||||
local DNSMASQ_TUN_DNS=$(get_first_dns TUN_DNS 53 | sed 's/:/#/g')
|
||||
local RUN_NEW_DNSMASQ=1
|
||||
RUN_NEW_DNSMASQ=${DNS_REDIRECT}
|
||||
if [ "${RUN_NEW_DNSMASQ}" == "0" ]; then
|
||||
#The old logic will be removed in the future.
|
||||
#Run a copy dnsmasq instance, DNS hijack that don't need a proxy devices.
|
||||
@@ -1605,7 +1607,7 @@ start_dns() {
|
||||
#Modify the default dnsmasq service
|
||||
lua $APP_PATH/helper_dnsmasq.lua stretch
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${TUN_DNS} \
|
||||
-DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${fakedns:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
@@ -1617,7 +1619,7 @@ start_dns() {
|
||||
GLOBAL_DNSMASQ_CONF=${GLOBAL_ACL_PATH}/dnsmasq.conf
|
||||
GLOBAL_DNSMASQ_CONF_PATH=${GLOBAL_ACL_PATH}/dnsmasq.d
|
||||
lua $APP_PATH/helper_dnsmasq.lua add_rule -FLAG "default" -TMP_DNSMASQ_PATH ${GLOBAL_DNSMASQ_CONF_PATH} -DNSMASQ_CONF_FILE ${GLOBAL_DNSMASQ_CONF} \
|
||||
-LISTEN_PORT ${GLOBAL_DNSMASQ_PORT} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${TUN_DNS} \
|
||||
-LISTEN_PORT ${GLOBAL_DNSMASQ_PORT} -DEFAULT_DNS ${DEFAULT_DNS} -LOCAL_DNS ${LOCAL_DNS} -TUN_DNS ${DNSMASQ_TUN_DNS} \
|
||||
-REMOTE_FAKEDNS ${fakedns:-0} -USE_DEFAULT_DNS "${USE_DEFAULT_DNS:-direct}" -CHINADNS_DNS ${china_ng_listen:-0} \
|
||||
-USE_DIRECT_LIST "${USE_DIRECT_LIST}" -USE_PROXY_LIST "${USE_PROXY_LIST}" -USE_BLOCK_LIST "${USE_BLOCK_LIST}" -USE_GFW_LIST "${USE_GFW_LIST}" -CHN_LIST "${CHN_LIST}" \
|
||||
-TCP_NODE ${TCP_NODE} -DEFAULT_PROXY_MODE ${TCP_PROXY_MODE} -NO_PROXY_IPV6 ${DNSMASQ_FILTER_PROXY_IPV6:-0} -NFTFLAG ${nftflag:-0} \
|
||||
@@ -1684,8 +1686,7 @@ acl_app() {
|
||||
socks_port=11100
|
||||
redir_port=11200
|
||||
dns_port=11300
|
||||
dnsmasq_port=11400
|
||||
[ -n "${GLOBAL_DNSMASQ_PORT}" ] && dnsmasq_port=$(get_new_port $GLOBAL_DNSMASQ_PORT)
|
||||
dnsmasq_port=${GLOBAL_DNSMASQ_PORT:-11400}
|
||||
chinadns_port=11500
|
||||
for item in $items; do
|
||||
sid=$(uci -q show "${CONFIG}.${item}" | grep "=acl_rule" | awk -F '=' '{print $1}' | awk -F '.' '{print $2}')
|
||||
@@ -1749,7 +1750,6 @@ acl_app() {
|
||||
|
||||
[ -n "$tcp_node" ] && {
|
||||
local GLOBAL_TCP_NODE=$(get_cache_var "ACL_GLOBAL_TCP_node")
|
||||
echolog "${GLOBAL_TCP_NODE}"
|
||||
[ -n "${GLOBAL_TCP_NODE}" ] && GLOBAL_TCP_redir_port=$(get_cache_var "ACL_GLOBAL_TCP_redir_port")
|
||||
if [ "$tcp_node" = "default" ]; then
|
||||
if [ -n "${GLOBAL_TCP_NODE}" ]; then
|
||||
@@ -2001,8 +2001,10 @@ start() {
|
||||
|
||||
if [ "$ENABLED_DEFAULT_ACL" == 1 ] || [ "$ENABLED_ACLS" == 1 ]; then
|
||||
[ "$(uci -q get dhcp.@dnsmasq[0].dns_redirect)" == "1" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0' 2>/dev/null
|
||||
uci commit dhcp 2>/dev/null
|
||||
uci -q set ${CONFIG}.@global[0].dnsmasq_dns_redirect='1'
|
||||
uci -q commit ${CONFIG}
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect='0'
|
||||
uci -q commit dhcp
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
}
|
||||
fi
|
||||
@@ -2045,11 +2047,23 @@ stop() {
|
||||
source $APP_PATH/helper_smartdns.sh del
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF
|
||||
rm -rf $GLOBAL_DNSMASQ_CONF_PATH
|
||||
[ -z "$(get_cache_var "ACL_default_dns_port")" ] && lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
[ "1" = "1" ] && {
|
||||
#restore logic
|
||||
bak_dnsmasq_dns_redirect=$(config_t_get global dnsmasq_dns_redirect)
|
||||
[ -n "${bak_dnsmasq_dns_redirect}" ] && {
|
||||
uci -q set dhcp.@dnsmasq[0].dns_redirect="${bak_dnsmasq_dns_redirect}"
|
||||
uci -q commit dhcp
|
||||
uci -q delete ${CONFIG}.@global[0].dnsmasq_dns_redirect
|
||||
uci -q commit ${CONFIG}
|
||||
}
|
||||
if [ -z "$(get_cache_var "ACL_default_dns_port")" ] || [ -n "${bak_dnsmasq_dns_redirect}" ]; then
|
||||
lua $APP_PATH/helper_dnsmasq.lua restart -LOG 0
|
||||
fi
|
||||
bak_bridge_nf_ipt=$(get_cache_var "bak_bridge_nf_ipt")
|
||||
[ -n "${bak_bridge_nf_ipt}" ] && sysctl -w net.bridge.bridge-nf-call-iptables=${bak_bridge_nf_ipt} >/dev/null 2>&1
|
||||
bak_bridge_nf_ip6t=$(get_cache_var "bak_bridge_nf_ip6t")
|
||||
[ -n "${bak_bridge_nf_ip6t}" ] && sysctl -w net.bridge.bridge-nf-call-ip6tables=${bak_bridge_nf_ip6t} >/dev/null 2>&1
|
||||
}
|
||||
rm -rf $TMP_PATH
|
||||
rm -rf /tmp/lock/${CONFIG}_socks_auto_switch*
|
||||
echolog "清空并关闭相关程序和缓存完成。"
|
||||
@@ -2108,6 +2122,7 @@ DNS_CACHE=0
|
||||
REMOTE_DNS=$(config_t_get global remote_dns 1.1.1.1:53 | sed 's/#/:/g' | sed -E 's/\:([^:]+)$/#\1/g')
|
||||
USE_DEFAULT_DNS=$(config_t_get global use_default_dns direct)
|
||||
FILTER_PROXY_IPV6=$(config_t_get global filter_proxy_ipv6 0)
|
||||
DNS_REDIRECT=$(config_t_get global dns_redirect 1)
|
||||
dns_listen_port=${DNS_PORT}
|
||||
|
||||
REDIRECT_LIST="socks ss ss-rust ssr sing-box xray trojan-plus naiveproxy hysteria2"
|
||||
|
||||
@@ -329,6 +329,7 @@ load_acl() {
|
||||
$ip6t_n -A PSW_DNS $(comment "$remarks") -p udp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect} 2>/dev/null
|
||||
$ipt_n -A PSW_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect}
|
||||
$ip6t_n -A PSW_DNS $(comment "$remarks") -p tcp ${_ipt_source} --dport 53 -j REDIRECT --to-ports ${dns_redirect} 2>/dev/null
|
||||
[ -z "$(get_cache_var "ACL_${sid}_tcp_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
fi
|
||||
|
||||
[ -n "$tcp_port" -o -n "$udp_port" ] && {
|
||||
|
||||
@@ -379,6 +379,7 @@ load_acl() {
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS ip protocol tcp ${_ipt_source} tcp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS meta l4proto udp ${_ipt_source} udp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
nft "add rule $NFTABLE_NAME PSW_DNS meta l4proto tcp ${_ipt_source} tcp dport 53 counter redirect to :${dns_redirect} comment \"$remarks\""
|
||||
[ -z "$(get_cache_var "ACL_${sid}_tcp_default")" ] && echolog " - ${msg}使用与全局配置不相同节点,已将DNS强制重定向到专用 DNS 服务器。"
|
||||
fi
|
||||
|
||||
[ -n "$tcp_port" -o -n "$udp_port" ] && {
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_DATE:=2024-12-13
|
||||
PKG_SOURCE_VERSION:=c7fc93df3757207f57fae47419087b2f902b6a88
|
||||
PKG_MIRROR_HASH:=18c2aaefdfe68e4de5629cac893b1d67db868c9c9fa5a415d1dcbc09a3193516
|
||||
PKG_SOURCE_DATE:=2024-12-19
|
||||
PKG_SOURCE_VERSION:=89dfabe9b36b22df896dcd1ab03c67c667ec20f3
|
||||
PKG_MIRROR_HASH:=5d2e9fe03dffa573af6bc300e39e21d95e7cde964f54d531e040e104780abd08
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
|
||||
@@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=alpha-c7fc93d
|
||||
PKG_BUILD_VERSION:=alpha-89dfabe
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sing-box
|
||||
PKG_VERSION:=1.10.3
|
||||
PKG_VERSION:=1.10.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=93c4fe679988a5414e45886c66f3b969917aa1940bb807f2e0281fdaf4fe27ef
|
||||
PKG_HASH:=2253aabe7d847eb8385fdc66879eb5d748255b663fe77a1dbb2b2c780f015163
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -12,13 +12,13 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202412190056
|
||||
GEOIP_VER:=202412201411
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=b75b994afcbb82f0b417001c015fa64e832bb6e66faf3a69ad4e423c9b29a463
|
||||
HASH:=3f72cea0044a747fcb28cce36f70946c9e664c55949046fd22679090edc264b9
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20241210004721
|
||||
|
||||
Vendored
+14
-22
@@ -2,12 +2,8 @@ name: Build APK
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
XRAY_CORE_VERSION:
|
||||
description: 'Xray core version or commit hash'
|
||||
required: false
|
||||
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -26,7 +22,7 @@ jobs:
|
||||
- name: Setup Golang
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23.2'
|
||||
go-version: '1.23.4'
|
||||
cache: false
|
||||
|
||||
- name: Patch Go use 600296
|
||||
@@ -49,45 +45,41 @@ jobs:
|
||||
cd ${{ github.workspace }}/build
|
||||
git clone --depth=1 -b main https://github.com/2dust/AndroidLibXrayLite.git
|
||||
cd AndroidLibXrayLite
|
||||
go get github.com/xtls/xray-core@${{ github.event.inputs.XRAY_CORE_VERSION }} || true
|
||||
gomobile init
|
||||
go mod tidy -v
|
||||
gomobile bind -v -androidapi 21 -ldflags='-s -w' ./
|
||||
cp *.aar ${{ github.workspace }}/V2rayNG/app/libs/
|
||||
|
||||
- name: Decode Keystore
|
||||
uses: timheuer/base64-to-file@v1
|
||||
id: android_keystore
|
||||
with:
|
||||
fileName: "android_keystore.jks"
|
||||
encodedString: ${{ secrets.APP_KEYSTORE_BASE64 }}
|
||||
|
||||
- name: Build APK
|
||||
run: |
|
||||
cd ${{ github.workspace }}/V2rayNG
|
||||
chmod 755 gradlew
|
||||
./gradlew assembleDebug
|
||||
./gradlew assembleRelease -Pandroid.injected.signing.store.file=${{ steps.android_keystore.outputs.filePath }} -Pandroid.injected.signing.store.password=${{ secrets.APP_KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.APP_KEYSTORE_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.APP_KEY_PASSWORD }}
|
||||
|
||||
- name: Upload arm64-v8a APK
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
name: arm64-v8a
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*arm64-v8a*.apk
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/release/*arm64-v8a*.apk
|
||||
|
||||
- name: Upload armeabi-v7a APK
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
name: armeabi-v7a
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*armeabi-v7a*.apk
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/release/*armeabi-v7a*.apk
|
||||
|
||||
- name: Upload x86 APK
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
name: x86-apk
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*x86*.apk
|
||||
|
||||
- name: Upload Other APKs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: others-apk
|
||||
path: |
|
||||
${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug
|
||||
!${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*arm64-v8a*.apk
|
||||
!${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*armeabi-v7a*.apk
|
||||
!${{ github.workspace }}/V2rayNG/app/build/outputs/apk/debug/*x86*.apk
|
||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/release/*x86*.apk
|
||||
@@ -115,7 +115,7 @@
|
||||
<string name="server_lab_port_hop_interval">فاصله پورت پرش (ثانیه)</string>
|
||||
<string name="server_lab_stream_pinsha256">PINSHA256</string>
|
||||
<string name="server_lab_xhttp_mode">حالت XHTTP</string>
|
||||
<string name="server_lab_xhttp_extra">جیسون خام XHTTP EXTRA، فرمت: { XHTTPObject }</string>
|
||||
<string name="server_lab_xhttp_extra">خام JSON XHTTP Extra، قالب: { XHTTPObject }</string>
|
||||
|
||||
<!-- PerAppProxyActivity -->
|
||||
<string name="title_user_asset_add_url">آدرس اینترنتی را اضافه کنید</string>
|
||||
@@ -178,8 +178,8 @@
|
||||
<string name="title_pref_domestic_dns">DNS داخلی (اختیاری)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_dns_hosts">DNS hosts (Format: domain:address,…)</string>
|
||||
<string name="summary_pref_dns_hosts">domain:address,…</string>
|
||||
<string name="title_pref_dns_hosts">DNS مستقیم هاست(فرمت: دامنه: آدرس،…)</string>
|
||||
<string name="summary_pref_dns_hosts">دامنه: آدرس، …</string>
|
||||
|
||||
<string name="title_pref_delay_test_url">آدرس اینترنتی آزمایش تاخیر واقعی کانفیگ ها (HTTP/HTTPS)</string>
|
||||
<string name="summary_pref_delay_test_url">URL</string>
|
||||
|
||||
@@ -179,14 +179,14 @@
|
||||
<string name="title_pref_domestic_dns">Внутренняя DNS (необязательно)</string>
|
||||
<string name="summary_pref_domestic_dns">DNS</string>
|
||||
|
||||
<string name="title_pref_dns_hosts">DNS hosts (Format: domain:address,…)</string>
|
||||
<string name="summary_pref_dns_hosts">domain:address,…</string>
|
||||
<string name="title_pref_dns_hosts">Узлы DNS (формат: домен:адрес,…)</string>
|
||||
<string name="summary_pref_dns_hosts">домен:адрес,…</string>
|
||||
|
||||
<string name="title_pref_delay_test_url">Сервис проверки времени отклика (HTTP/HTTPS)</string>
|
||||
<string name="summary_pref_delay_test_url">URL</string>
|
||||
|
||||
<string name="title_pref_proxy_sharing_enabled">Разрешать подключения из LAN</string>
|
||||
<string name="summary_pref_proxy_sharing_enabled">Другие устройства могут подключаться, используя ваш IP-адрес, чтобы использовать прокси по протоколам SOCKS/HTTP. Используйте только в доверенной сети, чтобы избежать несанкционированного подключения.</string>
|
||||
<string name="summary_pref_proxy_sharing_enabled">Другие устройства могут подключаться, используя ваш IP-адрес, чтобы использовать локальный прокси. Используйте только в доверенной сети, чтобы избежать несанкционированного подключения.</string>
|
||||
<string name="toast_warning_pref_proxysharing_short">Доступ из LAN разрешён, убедитесь, что вы находитесь в доверенной сети</string>
|
||||
|
||||
<string name="title_pref_allow_insecure">Разрешать небезопасные</string>
|
||||
@@ -292,7 +292,7 @@
|
||||
|
||||
<string name="connection_test_pending">Проверить подключение</string>
|
||||
<string name="connection_test_testing">Проверка…</string>
|
||||
<string name="connection_test_testing_count">Проверено профилей: %d</string>
|
||||
<string name="connection_test_testing_count">Проверка профилей: %d</string>
|
||||
<string name="connection_test_available">Успешно: HTTP-соединение заняло %d мс</string>
|
||||
<string name="connection_test_error">Сбой проверки интернет-соединения: %s</string>
|
||||
<string name="connection_test_fail">Интернет недоступен</string>
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/quic-go/quic-go"
|
||||
"github.com/xtls/quic-go"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
|
||||
"github.com/quic-go/quic-go/quicvarint"
|
||||
"github.com/xtls/quic-go/quicvarint"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/common/bytespool"
|
||||
|
||||
+1
-3
@@ -2,8 +2,6 @@ module github.com/xtls/xray-core
|
||||
|
||||
go 1.21.4
|
||||
|
||||
replace github.com/quic-go/quic-go v0.46.0 => github.com/xtls/quic-go v0.46.2
|
||||
|
||||
require (
|
||||
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0
|
||||
github.com/cloudflare/circl v1.4.0
|
||||
@@ -14,7 +12,6 @@ require (
|
||||
github.com/miekg/dns v1.1.62
|
||||
github.com/pelletier/go-toml v1.9.5
|
||||
github.com/pires/go-proxyproto v0.8.0
|
||||
github.com/quic-go/quic-go v0.46.0
|
||||
github.com/refraction-networking/utls v1.6.7
|
||||
github.com/sagernet/sing v0.5.1
|
||||
github.com/sagernet/sing-shadowsocks v0.2.7
|
||||
@@ -22,6 +19,7 @@ require (
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e
|
||||
github.com/vishvananda/netlink v1.3.0
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d
|
||||
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
|
||||
golang.org/x/crypto v0.31.0
|
||||
|
||||
+2
-2
@@ -68,8 +68,8 @@ github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQ
|
||||
github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
|
||||
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
|
||||
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
|
||||
github.com/xtls/quic-go v0.46.2 h1:bzUnZIQIH8SyqYGR6fAXzEvZauA+32J/2w2AtnEFa1o=
|
||||
github.com/xtls/quic-go v0.46.2/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI=
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087 h1:kKPg/cJPSKnE50VXVBskDYYSBkl4X3sMCIbTy+XKNGk=
|
||||
github.com/xtls/quic-go v0.0.0-20241220091641-6f5777d1c087/go.mod h1:mN9lAuc8Vt7eHvnQkDIH5+uHh+DcLmTBma9rLqk/rPY=
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d h1:+B97uD9uHLgAAulhigmys4BVwZZypzK7gPN3WtpgRJg=
|
||||
github.com/xtls/reality v0.0.0-20240712055506-48f0b2d5ed6d/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
|
||||
@@ -17,16 +17,12 @@ func (c *BrowserDialerClient) IsClosed() bool {
|
||||
panic("not implemented yet")
|
||||
}
|
||||
|
||||
func (c *BrowserDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser) {
|
||||
panic("not implemented yet")
|
||||
}
|
||||
func (c *BrowserDialerClient) OpenStream(ctx context.Context, url string, body io.Reader, uploadOnly bool) (io.ReadCloser, gonet.Addr, gonet.Addr, error) {
|
||||
if body != nil {
|
||||
panic("not implemented yet")
|
||||
}
|
||||
|
||||
func (c *BrowserDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser {
|
||||
panic("not implemented yet")
|
||||
}
|
||||
|
||||
func (c *BrowserDialerClient) OpenDownload(ctx context.Context, baseURL string) (io.ReadCloser, gonet.Addr, gonet.Addr, error) {
|
||||
conn, err := browser_dialer.DialGet(baseURL)
|
||||
conn, err := browser_dialer.DialGet(url)
|
||||
dummyAddr := &gonet.IPAddr{}
|
||||
if err != nil {
|
||||
return nil, dummyAddr, dummyAddr, err
|
||||
@@ -35,8 +31,8 @@ func (c *BrowserDialerClient) OpenDownload(ctx context.Context, baseURL string)
|
||||
return websocket.NewConnection(conn, dummyAddr, nil, 0), conn.RemoteAddr(), conn.LocalAddr(), nil
|
||||
}
|
||||
|
||||
func (c *BrowserDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error {
|
||||
bytes, err := io.ReadAll(payload)
|
||||
func (c *BrowserDialerClient) PostPacket(ctx context.Context, url string, body io.Reader, contentLength int64) error {
|
||||
bytes, err := io.ReadAll(body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -20,21 +20,11 @@ import (
|
||||
type DialerClient interface {
|
||||
IsClosed() bool
|
||||
|
||||
// (ctx, baseURL, payload) -> err
|
||||
// baseURL already contains sessionId and seq
|
||||
SendUploadRequest(context.Context, string, io.ReadWriteCloser, int64) error
|
||||
// ctx, url, body, uploadOnly
|
||||
OpenStream(context.Context, string, io.Reader, bool) (io.ReadCloser, net.Addr, net.Addr, error)
|
||||
|
||||
// (ctx, baseURL) -> (downloadReader, remoteAddr, localAddr)
|
||||
// baseURL already contains sessionId
|
||||
OpenDownload(context.Context, string) (io.ReadCloser, net.Addr, net.Addr, error)
|
||||
|
||||
// (ctx, baseURL) -> uploadWriter
|
||||
// baseURL already contains sessionId
|
||||
OpenUpload(context.Context, string) io.WriteCloser
|
||||
|
||||
// (ctx, pureURL) -> (uploadWriter, downloadReader)
|
||||
// pureURL can not contain sessionId
|
||||
Open(context.Context, string) (io.WriteCloser, io.ReadCloser)
|
||||
// ctx, url, body, contentLength
|
||||
PostPacket(context.Context, string, io.Reader, int64) error
|
||||
}
|
||||
|
||||
// implements splithttp.DialerClient in terms of direct network connections
|
||||
@@ -52,136 +42,56 @@ func (c *DefaultDialerClient) IsClosed() bool {
|
||||
return c.closed
|
||||
}
|
||||
|
||||
func (c *DefaultDialerClient) Open(ctx context.Context, pureURL string) (io.WriteCloser, io.ReadCloser) {
|
||||
reader, writer := io.Pipe()
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", pureURL, reader)
|
||||
req.Header = c.transportConfig.GetRequestHeader()
|
||||
if !c.transportConfig.NoGRPCHeader {
|
||||
req.Header.Set("Content-Type", "application/grpc")
|
||||
}
|
||||
wrc := &WaitReadCloser{Wait: make(chan struct{})}
|
||||
go func() {
|
||||
response, err := c.client.Do(req)
|
||||
if err != nil || response.StatusCode != 200 {
|
||||
if err != nil {
|
||||
errors.LogInfoInner(ctx, err, "failed to open ", pureURL)
|
||||
} else {
|
||||
// c.closed = true
|
||||
response.Body.Close()
|
||||
errors.LogInfo(ctx, "unexpected status ", response.StatusCode)
|
||||
}
|
||||
wrc.Close()
|
||||
return
|
||||
}
|
||||
wrc.Set(response.Body)
|
||||
}()
|
||||
return writer, wrc
|
||||
}
|
||||
|
||||
func (c *DefaultDialerClient) OpenUpload(ctx context.Context, baseURL string) io.WriteCloser {
|
||||
reader, writer := io.Pipe()
|
||||
req, _ := http.NewRequestWithContext(ctx, "POST", baseURL, reader)
|
||||
req.Header = c.transportConfig.GetRequestHeader()
|
||||
if !c.transportConfig.NoGRPCHeader {
|
||||
req.Header.Set("Content-Type", "application/grpc")
|
||||
}
|
||||
go func() {
|
||||
if resp, err := c.client.Do(req); err == nil {
|
||||
if resp.StatusCode != 200 {
|
||||
// c.closed = true
|
||||
}
|
||||
resp.Body.Close()
|
||||
}
|
||||
}()
|
||||
return writer
|
||||
}
|
||||
|
||||
func (c *DefaultDialerClient) OpenDownload(ctx context.Context, baseURL string) (io.ReadCloser, gonet.Addr, gonet.Addr, error) {
|
||||
var remoteAddr gonet.Addr
|
||||
var localAddr gonet.Addr
|
||||
func (c *DefaultDialerClient) OpenStream(ctx context.Context, url string, body io.Reader, uploadOnly bool) (wrc io.ReadCloser, remoteAddr, localAddr gonet.Addr, err error) {
|
||||
// this is done when the TCP/UDP connection to the server was established,
|
||||
// and we can unblock the Dial function and print correct net addresses in
|
||||
// logs
|
||||
gotConn := done.New()
|
||||
ctx = httptrace.WithClientTrace(ctx, &httptrace.ClientTrace{
|
||||
GotConn: func(connInfo httptrace.GotConnInfo) {
|
||||
remoteAddr = connInfo.Conn.RemoteAddr()
|
||||
localAddr = connInfo.Conn.LocalAddr()
|
||||
gotConn.Close()
|
||||
},
|
||||
})
|
||||
|
||||
var downResponse io.ReadCloser
|
||||
gotDownResponse := done.New()
|
||||
|
||||
ctx, ctxCancel := context.WithCancel(ctx)
|
||||
method := "GET"
|
||||
if body != nil {
|
||||
method = "POST"
|
||||
}
|
||||
req, _ := http.NewRequestWithContext(ctx, method, url, body)
|
||||
req.Header = c.transportConfig.GetRequestHeader()
|
||||
if method == "POST" && !c.transportConfig.NoGRPCHeader {
|
||||
req.Header.Set("Content-Type", "application/grpc")
|
||||
}
|
||||
|
||||
wrc = &WaitReadCloser{Wait: make(chan struct{})}
|
||||
go func() {
|
||||
trace := &httptrace.ClientTrace{
|
||||
GotConn: func(connInfo httptrace.GotConnInfo) {
|
||||
remoteAddr = connInfo.Conn.RemoteAddr()
|
||||
localAddr = connInfo.Conn.LocalAddr()
|
||||
gotConn.Close()
|
||||
},
|
||||
}
|
||||
|
||||
// in case we hit an error, we want to unblock this part
|
||||
defer gotConn.Close()
|
||||
|
||||
ctx = httptrace.WithClientTrace(ctx, trace)
|
||||
|
||||
req, err := http.NewRequestWithContext(
|
||||
ctx,
|
||||
"GET",
|
||||
baseURL,
|
||||
nil,
|
||||
)
|
||||
resp, err := c.client.Do(req)
|
||||
if err != nil {
|
||||
errors.LogInfoInner(ctx, err, "failed to construct download http request")
|
||||
gotDownResponse.Close()
|
||||
errors.LogInfoInner(ctx, err, "failed to "+method+" "+url)
|
||||
gotConn.Close()
|
||||
wrc.Close()
|
||||
return
|
||||
}
|
||||
|
||||
req.Header = c.transportConfig.GetRequestHeader()
|
||||
|
||||
response, err := c.client.Do(req)
|
||||
gotConn.Close()
|
||||
if err != nil {
|
||||
errors.LogInfoInner(ctx, err, "failed to send download http request")
|
||||
gotDownResponse.Close()
|
||||
return
|
||||
}
|
||||
|
||||
if response.StatusCode != 200 {
|
||||
if resp.StatusCode != 200 && !uploadOnly {
|
||||
// c.closed = true
|
||||
response.Body.Close()
|
||||
errors.LogInfo(ctx, "invalid status code on download:", response.Status)
|
||||
gotDownResponse.Close()
|
||||
errors.LogInfo(ctx, "unexpected status ", resp.StatusCode)
|
||||
}
|
||||
if resp.StatusCode != 200 || uploadOnly {
|
||||
resp.Body.Close()
|
||||
wrc.Close()
|
||||
return
|
||||
}
|
||||
|
||||
downResponse = response.Body
|
||||
gotDownResponse.Close()
|
||||
wrc.(*WaitReadCloser).Set(resp.Body)
|
||||
}()
|
||||
|
||||
<-gotConn.Wait()
|
||||
|
||||
lazyDownload := &LazyReader{
|
||||
CreateReader: func() (io.Reader, error) {
|
||||
<-gotDownResponse.Wait()
|
||||
if downResponse == nil {
|
||||
return nil, errors.New("downResponse failed")
|
||||
}
|
||||
return downResponse, nil
|
||||
},
|
||||
}
|
||||
|
||||
// workaround for https://github.com/quic-go/quic-go/issues/2143 --
|
||||
// always cancel request context so that Close cancels any Read.
|
||||
// Should then match the behavior of http2 and http1.
|
||||
reader := downloadBody{
|
||||
lazyDownload,
|
||||
ctxCancel,
|
||||
}
|
||||
|
||||
return reader, remoteAddr, localAddr, nil
|
||||
return
|
||||
}
|
||||
|
||||
func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string, payload io.ReadWriteCloser, contentLength int64) error {
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", url, payload)
|
||||
func (c *DefaultDialerClient) PostPacket(ctx context.Context, url string, body io.Reader, contentLength int64) error {
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", url, body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -257,16 +167,6 @@ func (c *DefaultDialerClient) SendUploadRequest(ctx context.Context, url string,
|
||||
return nil
|
||||
}
|
||||
|
||||
type downloadBody struct {
|
||||
io.Reader
|
||||
cancel context.CancelFunc
|
||||
}
|
||||
|
||||
func (c downloadBody) Close() error {
|
||||
c.cancel()
|
||||
return nil
|
||||
}
|
||||
|
||||
type WaitReadCloser struct {
|
||||
Wait chan struct{}
|
||||
io.ReadCloser
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/quic-go/quic-go"
|
||||
"github.com/quic-go/quic-go/http3"
|
||||
"github.com/xtls/quic-go"
|
||||
"github.com/xtls/quic-go/http3"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/buf"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
@@ -343,44 +343,19 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
||||
errors.LogInfo(ctx, fmt.Sprintf("XHTTP is downloading from %s, mode %s, HTTP version %s, host %s", dest2, "stream-down", httpVersion2, requestURL2.Host))
|
||||
}
|
||||
|
||||
var writer io.WriteCloser
|
||||
var reader io.ReadCloser
|
||||
var remoteAddr, localAddr net.Addr
|
||||
var err error
|
||||
|
||||
if mode == "stream-one" {
|
||||
requestURL.Path = transportConfiguration.GetNormalizedPath()
|
||||
if xmuxClient != nil {
|
||||
xmuxClient.LeftRequests.Add(-1)
|
||||
}
|
||||
writer, reader = httpClient.Open(context.WithoutCancel(ctx), requestURL.String())
|
||||
remoteAddr = &net.TCPAddr{}
|
||||
localAddr = &net.TCPAddr{}
|
||||
} else {
|
||||
if xmuxClient2 != nil {
|
||||
xmuxClient2.LeftRequests.Add(-1)
|
||||
}
|
||||
reader, remoteAddr, localAddr, err = httpClient2.OpenDownload(context.WithoutCancel(ctx), requestURL2.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if xmuxClient != nil {
|
||||
xmuxClient.OpenUsage.Add(1)
|
||||
}
|
||||
if xmuxClient2 != nil && xmuxClient2 != xmuxClient {
|
||||
xmuxClient2.OpenUsage.Add(1)
|
||||
}
|
||||
var once atomic.Int32
|
||||
var closed atomic.Int32
|
||||
|
||||
reader, writer := io.Pipe()
|
||||
conn := splitConn{
|
||||
writer: writer,
|
||||
reader: reader,
|
||||
remoteAddr: remoteAddr,
|
||||
localAddr: localAddr,
|
||||
writer: writer,
|
||||
onClose: func() {
|
||||
if once.Add(-1) < 0 {
|
||||
if closed.Add(1) > 1 {
|
||||
return
|
||||
}
|
||||
if xmuxClient != nil {
|
||||
@@ -393,16 +368,27 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
||||
}
|
||||
|
||||
if mode == "stream-one" {
|
||||
requestURL.Path = transportConfiguration.GetNormalizedPath()
|
||||
if xmuxClient != nil {
|
||||
xmuxClient.LeftRequests.Add(-1)
|
||||
}
|
||||
conn.reader, conn.remoteAddr, conn.localAddr, _ = httpClient.OpenStream(context.WithoutCancel(ctx), requestURL.String(), reader, false)
|
||||
return stat.Connection(&conn), nil
|
||||
} else { // stream-down
|
||||
var err error
|
||||
if xmuxClient2 != nil {
|
||||
xmuxClient2.LeftRequests.Add(-1)
|
||||
}
|
||||
conn.reader, conn.remoteAddr, conn.localAddr, err = httpClient2.OpenStream(context.WithoutCancel(ctx), requestURL2.String(), nil, false)
|
||||
if err != nil { // browser dialer only
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if mode == "stream-up" {
|
||||
if xmuxClient != nil {
|
||||
xmuxClient.LeftRequests.Add(-1)
|
||||
}
|
||||
conn.writer = httpClient.OpenUpload(ctx, requestURL.String())
|
||||
httpClient.OpenStream(ctx, requestURL.String(), reader, true)
|
||||
return stat.Connection(&conn), nil
|
||||
}
|
||||
|
||||
@@ -466,7 +452,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
|
||||
}
|
||||
|
||||
go func() {
|
||||
err := httpClient.SendUploadRequest(
|
||||
err := httpClient.PostPacket(
|
||||
context.WithoutCancel(ctx),
|
||||
url.String(),
|
||||
&buf.MultiBufferContainer{MultiBuffer: chunk},
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/quic-go/quic-go"
|
||||
"github.com/quic-go/quic-go/http3"
|
||||
"github.com/xtls/quic-go"
|
||||
"github.com/xtls/quic-go/http3"
|
||||
goreality "github.com/xtls/reality"
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package splithttp
|
||||
|
||||
import (
|
||||
"io"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Close is intentionally not supported by LazyReader because it's not clear
|
||||
// how CreateReader should be aborted in case of Close. It's best to wrap
|
||||
// LazyReader in another struct that handles Close correctly, or better, stop
|
||||
// using LazyReader entirely.
|
||||
type LazyReader struct {
|
||||
readerSync sync.Mutex
|
||||
CreateReader func() (io.Reader, error)
|
||||
reader io.Reader
|
||||
readerError error
|
||||
}
|
||||
|
||||
func (r *LazyReader) getReader() (io.Reader, error) {
|
||||
r.readerSync.Lock()
|
||||
defer r.readerSync.Unlock()
|
||||
if r.reader != nil {
|
||||
return r.reader, nil
|
||||
}
|
||||
|
||||
if r.readerError != nil {
|
||||
return nil, r.readerError
|
||||
}
|
||||
|
||||
reader, err := r.CreateReader()
|
||||
if err != nil {
|
||||
r.readerError = err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
r.reader = reader
|
||||
return reader, nil
|
||||
}
|
||||
|
||||
func (r *LazyReader) Read(b []byte) (int, error) {
|
||||
reader, err := r.getReader()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
n, err := reader.Read(b)
|
||||
return n, err
|
||||
}
|
||||
Reference in New Issue
Block a user