diff --git a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rg351v-uboot.dtb b/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rg351v-uboot.dtb deleted file mode 100644 index 4b0e936f61..0000000000 Binary files a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rk3326-r36s-linux.dtb deleted file mode 100644 index 268a86080f..0000000000 Binary files a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 8/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rg351v-uboot.dtb b/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rg351v-uboot.dtb deleted file mode 100644 index 2a1bda66ed..0000000000 Binary files a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rk3326-r36s-linux.dtb deleted file mode 100644 index 9c89d09099..0000000000 Binary files a/config/archr-dts/clone/G80C-MB V1.1-20250319 Panel 9/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rg351v-uboot.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rg351v-uboot.dtb deleted file mode 100644 index 55c000bd80..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rk3326-r36s-linux.dtb deleted file mode 100644 index 6897c5ff81..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 8/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rg351v-uboot.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rg351v-uboot.dtb deleted file mode 100644 index 2a1bda66ed..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rk3326-r36s-linux.dtb deleted file mode 100644 index d350b8582e..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250422 Panel 9/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rg351v-uboot.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rg351v-uboot.dtb deleted file mode 100644 index 55c000bd80..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rk3326-r36s-linux.dtb deleted file mode 100644 index c9c0ce3fd7..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 8/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rg351v-uboot.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rg351v-uboot.dtb deleted file mode 100644 index 2a1bda66ed..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rk3326-r36s-linux.dtb deleted file mode 100644 index 2f5efc492b..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.2-20250423 Panel 9/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rg351v-uboot.dtb b/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rg351v-uboot.dtb deleted file mode 100644 index 55c000bd80..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rk3326-r36s-linux.dtb deleted file mode 100644 index 30b693b212..0000000000 Binary files a/config/archr-dts/clone/G80CA-MB V1.3-20251212 Panel 8/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rg351v-uboot.dtb b/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rg351v-uboot.dtb deleted file mode 100644 index 4b0e936f61..0000000000 Binary files a/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rk3326-r36s-linux.dtb b/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rk3326-r36s-linux.dtb deleted file mode 100644 index 9edd54164d..0000000000 Binary files a/config/archr-dts/clone/G80D-MB V1.0-20250609 Panel 8/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/GR36-MB V1.1-20250422/rg351v-uboot.dtb b/config/archr-dts/clone/GR36-MB V1.1-20250422/rg351v-uboot.dtb deleted file mode 100644 index 4aee1bf2c0..0000000000 Binary files a/config/archr-dts/clone/GR36-MB V1.1-20250422/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/GR36-MB V1.1-20250422/rk3326-r36s-linux.dtb b/config/archr-dts/clone/GR36-MB V1.1-20250422/rk3326-r36s-linux.dtb deleted file mode 100644 index e1d8c59951..0000000000 Binary files a/config/archr-dts/clone/GR36-MB V1.1-20250422/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rg351v-uboot.dtb deleted file mode 100644 index 2a1bda66ed..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rk3326-r36s-linux.dtb deleted file mode 100644 index dc261d91a0..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 3 A/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rg351v-uboot.dtb deleted file mode 100644 index c42bbadb94..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rk3326-r36s-linux.dtb deleted file mode 100644 index 871f0602ba..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 1 Panel 8 A/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rg351v-uboot.dtb deleted file mode 100644 index 436de3ef88..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rk3326-r36s-linux.dtb deleted file mode 100644 index ec0576ccb3..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1 A/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rg351v-uboot.dtb deleted file mode 100644 index 81aaa7c57e..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rk3326-r36s-linux.dtb deleted file mode 100644 index bb477a65a4..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 2 Panel 1/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rg351v-uboot.dtb deleted file mode 100644 index bb4e70d973..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rk3326-r36s-linux.dtb deleted file mode 100644 index ee2b7c2064..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel 3/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rg351v-uboot.dtb deleted file mode 100644 index 5f723fec57..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rk3326-r36s-linux.dtb deleted file mode 100644 index 922cacf078..0000000000 Binary files a/config/archr-dts/clone/R36S-V12 2023-08-18 Variant 3 Panel A/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rg351v-uboot.dtb deleted file mode 100644 index 4460c8301d..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rk3326-r36s-linux.dtb deleted file mode 100644 index 11d0d3e63d..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2541/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rg351v-uboot.dtb deleted file mode 100644 index c240a4adae..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rk3326-r36s-linux.dtb deleted file mode 100644 index e033873546..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2548/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rg351v-uboot.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rg351v-uboot.dtb deleted file mode 100644 index c240a4adae..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rk3326-r36s-linux.dtb b/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rk3326-r36s-linux.dtb deleted file mode 100644 index 0b7aa23d2f..0000000000 Binary files a/config/archr-dts/clone/R36S-V20 2025-05-18 2549/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/HL-R36H-V20 2024-05-18/rg351mp-uboot.dtb b/config/archr-dts/original/HL-R36H-V20 2024-05-18/rg351mp-uboot.dtb deleted file mode 100644 index 674624086b..0000000000 Binary files a/config/archr-dts/original/HL-R36H-V20 2024-05-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/HL-R36H-V20 2024-05-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/HL-R36H-V20 2024-05-18/rk3326-r36s-linux.dtb deleted file mode 100644 index e249a48413..0000000000 Binary files a/config/archr-dts/original/HL-R36H-V20 2024-05-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/HL-R36H-V21 2024-11-18/rg351mp-uboot.dtb b/config/archr-dts/original/HL-R36H-V21 2024-11-18/rg351mp-uboot.dtb deleted file mode 100644 index beae6be706..0000000000 Binary files a/config/archr-dts/original/HL-R36H-V21 2024-11-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/HL-R36H-V21 2024-11-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/HL-R36H-V21 2024-11-18/rk3326-r36s-linux.dtb deleted file mode 100644 index cd5eae473a..0000000000 Binary files a/config/archr-dts/original/HL-R36H-V21 2024-11-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R35S-V11 2022-08-18/rg351mp-uboot.dtb b/config/archr-dts/original/R35S-V11 2022-08-18/rg351mp-uboot.dtb deleted file mode 100644 index 13082d4950..0000000000 Binary files a/config/archr-dts/original/R35S-V11 2022-08-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R35S-V11 2022-08-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R35S-V11 2022-08-18/rk3326-r36s-linux.dtb deleted file mode 100644 index 9f849a61d0..0000000000 Binary files a/config/archr-dts/original/R35S-V11 2022-08-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S Plus-V20 2025-03-18/rg351mp-uboot.dtb b/config/archr-dts/original/R36S Plus-V20 2025-03-18/rg351mp-uboot.dtb deleted file mode 100644 index d4efbe1979..0000000000 Binary files a/config/archr-dts/original/R36S Plus-V20 2025-03-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S Plus-V20 2025-03-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S Plus-V20 2025-03-18/rk3326-r36s-linux.dtb deleted file mode 100644 index b1fcad8e57..0000000000 Binary files a/config/archr-dts/original/R36S Plus-V20 2025-03-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rg351mp-uboot.dtb deleted file mode 100644 index 13082d4950..0000000000 Binary files a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rk3326-r36s-linux.dtb deleted file mode 100644 index 4c236e2e2c..0000000000 Binary files a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 0/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rg351mp-uboot.dtb deleted file mode 100644 index cd2e421411..0000000000 Binary files a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rk3326-r36s-linux.dtb deleted file mode 100644 index 1b62e80c93..0000000000 Binary files a/config/archr-dts/original/R36S-V12 2023-08-18 Panel 4/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2550/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2550/rg351mp-uboot.dtb deleted file mode 100644 index 16fc5db27e..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2550/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2550/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2550/rk3326-r36s-linux.dtb deleted file mode 100644 index 4aea8292d3..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2550/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2551/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2551/rg351mp-uboot.dtb deleted file mode 100644 index 16fc5db27e..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2551/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2551/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2551/rk3326-r36s-linux.dtb deleted file mode 100644 index 40cd573d67..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2551/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2552/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2552/rg351mp-uboot.dtb deleted file mode 100644 index 16fc5db27e..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2552/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V21 2024-12-18 2552/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V21 2024-12-18 2552/rk3326-r36s-linux.dtb deleted file mode 100644 index 65e725f6a9..0000000000 Binary files a/config/archr-dts/original/R36S-V21 2024-12-18 2552/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V22 2024-12-18/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V22 2024-12-18/rg351mp-uboot.dtb deleted file mode 100644 index ea75c89cf6..0000000000 Binary files a/config/archr-dts/original/R36S-V22 2024-12-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V22 2024-12-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V22 2024-12-18/rk3326-r36s-linux.dtb deleted file mode 100644 index 064b737ba6..0000000000 Binary files a/config/archr-dts/original/R36S-V22 2024-12-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V30 2025-11-18/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-V30 2025-11-18/rg351mp-uboot.dtb deleted file mode 100644 index 9d08e62621..0000000000 Binary files a/config/archr-dts/original/R36S-V30 2025-11-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-V30 2025-11-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-V30 2025-11-18/rk3326-r36s-linux.dtb deleted file mode 100644 index a338769cf7..0000000000 Binary files a/config/archr-dts/original/R36S-V30 2025-11-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-Y02 2024-11-27/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-Y02 2024-11-27/rg351mp-uboot.dtb deleted file mode 100644 index c66f37270d..0000000000 Binary files a/config/archr-dts/original/R36S-Y02 2024-11-27/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-Y02 2024-11-27/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-Y02 2024-11-27/rk3326-r36s-linux.dtb deleted file mode 100644 index 2bc7cfa6b2..0000000000 Binary files a/config/archr-dts/original/R36S-Y02 2024-11-27/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-Y02 2024-12-18/rg351mp-uboot.dtb b/config/archr-dts/original/R36S-Y02 2024-12-18/rg351mp-uboot.dtb deleted file mode 100644 index c66f37270d..0000000000 Binary files a/config/archr-dts/original/R36S-Y02 2024-12-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36S-Y02 2024-12-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36S-Y02 2024-12-18/rk3326-r36s-linux.dtb deleted file mode 100644 index f631964460..0000000000 Binary files a/config/archr-dts/original/R36S-Y02 2024-12-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36XX-V21 2024-12-18/rg351mp-uboot.dtb b/config/archr-dts/original/R36XX-V21 2024-12-18/rg351mp-uboot.dtb deleted file mode 100644 index c72ddcd7e7..0000000000 Binary files a/config/archr-dts/original/R36XX-V21 2024-12-18/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/R36XX-V21 2024-12-18/rk3326-r36s-linux.dtb b/config/archr-dts/original/R36XX-V21 2024-12-18/rk3326-r36s-linux.dtb deleted file mode 100644 index 409dfd63ee..0000000000 Binary files a/config/archr-dts/original/R36XX-V21 2024-12-18/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/original/RG36S-Y07 2025-09-11/rg351mp-uboot.dtb b/config/archr-dts/original/RG36S-Y07 2025-09-11/rg351mp-uboot.dtb deleted file mode 100644 index c66f37270d..0000000000 Binary files a/config/archr-dts/original/RG36S-Y07 2025-09-11/rg351mp-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/original/RG36S-Y07 2025-09-11/rk3326-r36s-linux.dtb b/config/archr-dts/original/RG36S-Y07 2025-09-11/rk3326-r36s-linux.dtb deleted file mode 100644 index 39e8f5f1c3..0000000000 Binary files a/config/archr-dts/original/RG36S-Y07 2025-09-11/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/retrogame_joypad_s2_f1.dtsi b/config/archr-dts/retrogame_joypad_s2_f1.dtsi deleted file mode 100644 index 7a0f231091..0000000000 --- a/config/archr-dts/retrogame_joypad_s2_f1.dtsi +++ /dev/null @@ -1,122 +0,0 @@ -/* - This is a skeleton of joypad with 2 sticks and FN (MODE) button. - Fits devices with 1 stick and 2 extra face buttons too. - By including this ans setting I/O properties only, - devices should get consistent controller id and mapping - thus reusing non-game configs: - * SDL gamecontrollerdb.txt - * ES es_input.cfg - * Retroarch gamepad -*/ - -/ { - joypad: retrogame_joypad_s2_f1 { - /* These drivers emit the same button set which makes this skeleton ADC-agnostic */ - /* compatible = "archr-joypad"; */ - /* compatible = "archr-singleadc-joypad"; */ - - /* These are constants making Joystick Guid the same */ - joypad-name = "retrogame_joypad_s2_f1"; - joypad-vendor = <0x484B>; - joypad-product = <0x1121>; /* 11 inherited, 2 for number of sticks, 1 for number of FN */ - joypad-revision = <0x0100>; - - /* require explicit status = "okay"; */ - status = "disabled"; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <64>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* meaningful node names for easier use */ - up { - label = "GPIO DPAD-UP"; - linux,code = ; - }; - down { - label = "GPIO DPAD-DOWN"; - linux,code = ; - }; - left { - label = "GPIO DPAD-LEFT"; - linux,code = ; - }; - right { - label = "GPIO DPAD-RIGHT"; - linux,code = ; - }; - - a { - label = "GPIO BTN-A"; - linux,code = ; - }; - b { - label = "GPIO BTN-B"; - linux,code = ; - }; - x { - label = "GPIO BTN-X"; - linux,code = ; - }; - y { - label = "GPIO BTN-Y"; - linux,code = ; - }; - - select { - label = "GPIO BTN_SELECT"; - linux,code = ; - }; - start { - label = "GPIO BTN_START"; - linux,code = ; - }; - mode { - label = "GPIO BTN_F"; - linux,code = ; - }; - - tl { - label = "GPIO BTN_TL"; - linux,code = ; - }; - tr { - label = "GPIO BTN_TR"; - linux,code = ; - }; - tl2 { - label = "GPIO BTN_TL2"; - linux,code = ; - }; - tr2 { - label = "GPIO BTN_TR2"; - linux,code = ; - }; - - thumbl { - label = "GPIO BTN_THUMBL"; - linux,code = ; - }; - thumbr { - label = "GPIO BTN_THUMBR"; - linux,code = ; - }; - }; -}; diff --git a/config/archr-dts/rk3326-anbernic-rg351m.dts b/config/archr-dts/rk3326-anbernic-rg351m.dts deleted file mode 100644 index c12bb79944..0000000000 --- a/config/archr-dts/rk3326-anbernic-rg351m.dts +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "Anbernic RG351M"; - compatible = "anbernic,rg351m", "rockchip,rk3326"; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3500000>; - charge-term-current-microamp = <350000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - vibrator { - compatible = "pwm-vibrator"; - pwms = <&pwm0 0 1000000 0>; - pwm-names = "enable"; - }; -}; - -/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ - -&internal_display { - compatible = "elida,kd35t133"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; - rotation = <270>; -}; - -&pwm0 { - status = "okay"; -}; - -&rk817_charger { - /* This device does not have a current sense resistor */ - //rockchip,resistor-sense-micro-ohms = <0>; - monitored-battery = <&battery>; -}; diff --git a/config/archr-dts/rk3326-anbernic-rg351m.dtsi b/config/archr-dts/rk3326-anbernic-rg351m.dtsi deleted file mode 100644 index f580df54e6..0000000000 --- a/config/archr-dts/rk3326-anbernic-rg351m.dtsi +++ /dev/null @@ -1,480 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - aliases { - mmc0 = &sdmmc; - }; - - chosen { - stdout-path = "serial2:115200n8"; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - power-supply = <&vcc_bl>; - pwms = <&pwm1 0 25000 0>; - }; - - /* - * LED is a tri-state. Driven high it is red, driven low it is - * green, and not driven at all (pin set to input) it is amber. - * Additionally, there is a 2nd LED that is not controllable - * that is on (red) when plugged in to power. - */ - gpio_led: gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&led_pin>; - - red_green_led: led-0 { - color = ; - gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; - function = LED_FUNCTION_CHARGING; - }; - }; - - rk817-sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "rk817_int"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker", "SPKO"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: regulator-vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; - - vibrator { - compatible = "pwm-vibrator"; - pwms = <&pwm0 0 1000000 0>; - pwm-names = "enable"; - }; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - internal_display: panel@0 { - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - #clock-cells = <1>; - clock-names = "mclk"; - clock-output-names = "rk808-clkout1", "xin32k"; - clocks = <&cru SCLK_I2S1_OUT>; - interrupt-parent = <&gpio0>; - interrupts = ; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - pinctrl-names = "default"; - #sound-dai-cells = <0>; - wakeup-source; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vccsys>; - vcc8-supply = <&vccsys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1150000>; - regulator-min-microvolt = <950000>; - regulator-name = "vdd_logic"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1350000>; - regulator-min-microvolt = <950000>; - regulator-name = "vdd_arm"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc_ddr"; - - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc_3v3: DCDC_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_3v3"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_1v8: LDO_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1800000>; - regulator-min-microvolt = <1800000>; - regulator-name = "vcc_1v8"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vdd_1v0: LDO_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1000000>; - regulator-min-microvolt = <1000000>; - regulator-name = "vdd_1v0"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc3v3_pmu: LDO_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc3v3_pmu"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <1800000>; - regulator-name = "vccio_sd"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_sd"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_bl: LDO_REG7 { - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_bl"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_lcd: LDO_REG8 { - regulator-max-microvolt = <2800000>; - regulator-min-microvolt = <2800000>; - regulator-name = "vcc_lcd"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - vcc_wifi: LDO_REG9 { - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_wifi"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - usb_midu: BOOST { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <5400000>; - regulator-min-microvolt = <5000000>; - regulator-name = "usb_midu"; - }; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -&i2s1_2ch { - status = "okay"; -}; - -&io_domains { - vccio1-supply = <&vcc_3v3>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc_3v3>; - vccio4-supply = <&vcc_3v3>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_3v3>; - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - status = "okay"; -}; - -&pwm0 { - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc_1v8>; - status = "okay"; -}; - -&sdmmc { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sfc { - #address-cells = <1>; - pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; - pinctrl-names = "default"; - #size-cells = <0>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <108000000>; - spi-rx-bus-width = <2>; - spi-tx-bus-width = <1>; - }; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -&uart2 { - pinctrl-0 = <&uart2m1_xfer>; - pinctrl-names = "default"; - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&pinctrl { - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - leds { - led_pin: led-pin { - rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-anbernic-rg351v.dts b/config/archr-dts/rk3326-anbernic-rg351v.dts deleted file mode 100644 index 26658a37f4..0000000000 --- a/config/archr-dts/rk3326-anbernic-rg351v.dts +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "Anbernic RG351V"; - compatible = "anbernic,rg351v", "rockchip,rk3326"; - - aliases { - mmc0 = &sdio; - mmc1 = &sdmmc; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-volume-up { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3500000>; - charge-term-current-microamp = <350000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - vibrator { - compatible = "pwm-vibrator"; - pwms = <&pwm0 0 1000000 0>; - pwm-names = "enable"; - }; -}; - -/* conflicts with pwm vibration motor */ -/delete-node/ &vcc_host; - -/* Device only has 1 LED compared to Odroid Go Advance */ -/delete-node/ &gpio_led; - -&internal_display { - compatible = "anbernic,rg351v-panel", "newvision,nv3051d"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; -}; - -&io_domains { - vccio1-supply = <&vccio_sd>; -}; - -/delete-node/ &pwm_led; - -&pwm0 { - status = "okay"; -}; - -/delete-node/ &pwm3; - -&rk817_charger { - /* This device does not have a current sense resistor */ - rockchip,resistor-sense-micro-ohms = <0>; - monitored-battery = <&battery>; -}; - -&sdio { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&vcc_sd { - regulator-max-microvolt = <3000000>; - regulator-min-microvolt = <1800000>; -}; - -&vccio_sd { - regulator-max-microvolt = <1800000>; -}; - -&pinctrl { - btns { - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-batlexp-g350.dts b/config/archr-dts/rk3326-batlexp-g350.dts deleted file mode 100644 index 9cad95fc57..0000000000 --- a/config/archr-dts/rk3326-batlexp-g350.dts +++ /dev/null @@ -1,163 +0,0 @@ -/// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* -* Copyright (c) 2025 lcdyk <2670878301@qq.com> -*/ - -/dts-v1/; -#include "rk3326-gameconsole-r3xs.dtsi" -#include "retrogame_joypad_s2_f1.dtsi" - -/ { - model = "BatleXP G350"; - compatible = "batlexp,g350", "rockchip,rk3326"; -}; - -&joypad { - compatible = "archr-singleadc-joypad"; - pwms = <&pwm0 0 200000000 0>; - pwm-names = "enable"; - rumble-boost-weak = <0x0000>; - rumble-boost-strong = <0x0000>; - joypad-name = "retrogame_joypad"; - joypad-vendor = <0x484B>; - joypad-product = <0x1101>; - joypad-revision = <0x0100>; - - status = "okay"; - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - pinctrl-1 = <&pwm0_pin>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - amux-count = <4>; - /* non-default wiring */ - amux-channel-mapping = <2 0 1 3>; - /* adc mux enable gpio */ - amux-a-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - invert-absx; - invert-absy; - invert-absrx; - - up { gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; }; - down { gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; }; - left { gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; }; - right { gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; }; - a { gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; }; - b { gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; }; - x { gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; }; - y { gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; }; - select { gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; }; - start { gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; }; - mode { gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>; }; - tl { gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; }; - tr { gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; }; - tl2 { gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; }; - tr2 { gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; }; - thumbl { gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; }; - thumbr { gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; }; -}; - -&dsi { - internal_display: panel@0 { - compatible = "archr,generic-dsi"; - iovcc-supply = <&vcc_lcd>; - vcc-supply = <&vcc_lcd>; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - panel_description = - "G size=52,70 delays=20,150,20,120,20 format=rgb888 lanes=4 flags=0xe03", - - "M clock=50000 horizontal=640,450,70,450 vertical=480,17,5,13 default=1", - "M clock=50000 horizontal=640,450,85,450 vertical=480,17,106,13", - "M clock=50010 horizontal=640,450,127,450 vertical=480,17,90,13", - "M clock=50010 horizontal=640,450,73,450 vertical=480,17,110,13", - "M clock=50830 horizontal=640,450,85,450 vertical=480,17,34,13", - "M clock=53200 horizontal=640,450,128,450 vertical=480,17,24,13", - "M clock=50400 horizontal=640,450,77,450 vertical=480,17,10,13", - "M clock=50310 horizontal=640,450,85,450 vertical=480,17,6,13", - "M clock=54600 horizontal=640,450,94,450 vertical=480,17,46,13", - "M clock=65370 horizontal=640,450,113,450 vertical=480,17,14,13", - "M clock=76050 horizontal=640,450,85,450 vertical=480,17,10,13", - "M clock=100620 horizontal=640,450,85,450 vertical=480,17,6,13", - - "I seq=b9f11283", - "I seq=b1000000da80", - "I seq=b2001370", - "I seq=b31010282803ff00000000", - "I seq=b480", - "I seq=b50a0a", - "I seq=b67f7f", - "I seq=b82662f063", - "I seq=ba338105f90e0e2000000000000000442500900a0000014f01000037", - "I seq=bc47", - "I seq=bf021100", - "I seq=c0737350500000125000", - "I seq=c15300323277d1cccc77773333", - "I seq=c68200bfff00ff", - "I seq=c7b8000a000000", - "I seq=c810401e02", - "I seq=cc0b", - "I seq=e000070d37353f4144060c0d0f111012141a00070d37353f4144060c0d0f111012141a", - "I seq=e307070b0b0b0b00000000ff00c010", - "I seq=e9c810020000b0b11131232880b0b127080004020000000004020000008888ba60240888888888888888ba713518888888888800000001000000000000000000", - "I seq=ea970a820203070000000000008188ba17538888888888888088ba0642888888888888230000028000000000000000000000000000000000000000000000", - "I seq=efffff01", - "I seq=11 wait=200", - "I seq=29 wait=50"; - }; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-device-group-r36.dtsi b/config/archr-dts/rk3326-device-group-r36.dtsi deleted file mode 100644 index f38e1abe8e..0000000000 --- a/config/archr-dts/rk3326-device-group-r36.dtsi +++ /dev/null @@ -1,8 +0,0 @@ -/ { - archr,device_switch { - r33s = "rk3326-gameconsole-r33s"; - r36s = "rk3326-gameconsole-r36s"; - soysauce = "rk3326-gameconsole-soysauce"; - rgb10x = "rk3326-powkiddy-rgb10x"; - }; -}; diff --git a/config/archr-dts/rk3326-gameconsole-eeclone.dts b/config/archr-dts/rk3326-gameconsole-eeclone.dts deleted file mode 100644 index f833102605..0000000000 --- a/config/archr-dts/rk3326-gameconsole-eeclone.dts +++ /dev/null @@ -1,960 +0,0 @@ -/// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2024-present ROCKNIX (https://github.com/ROCKNIX) - * Copyright (c) 2025 Danil Zagoskin - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - model = "R36S Clone"; - compatible = "gameconsole,eeclone", "rockchip,rk3326"; - - aliases { - mmc0 = &emmc; - mmc1 = &sdmmc; - mmc2 = &sdio; - serial1 = &uart2; - serial2 = &uart5; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&pwm1 0 25000 0>; - brightness-levels = < - 0 1 2 3 4 5 6 7 - 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 - 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255>; - default-brightness-level = <128>; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <4000000>; - charge-term-current-microamp = <200000>; - constant-charge-current-max-microamp = <1500000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <100000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3300000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = - <4046950 100>, <4001920 95>, <3967900 90>, <3940000 85>, - <3910000 80>, <3870000 75>, <3830000 70>, <3790000 65>, - <3750000 60>, <3720000 55>, <3690000 50>, <3650000 45>, - <3610000 40>, <3570000 35>, <3540000 30>, <3500000 25>, - <3460000 20>, <3420000 15>, <3380000 10>, <3340000 5>, - <3300000 0>; - }; - - adc_keys: adc-keys { - compatible = "adc-keys"; - io-channels = <&saradc 2>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <1800000>; - poll-interval = <100>; - - /* disabled by default, dtbo may enable it when needed */ - status = "disabled"; - - button-vol-up { - press-threshold-microvolt = <15000>; - label = "VOLUMEUP"; - linux,code = ; - }; - - button-vol-down { - press-threshold-microvolt = <300000>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - }; - - joypad: joypad { - compatible = "archr-singleadc-joypad"; - - joypad-name = "r36s_Gamepad"; - joypad-product = <0x1188>; - joypad-revision = <0x0188>; - - status = "okay"; - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - amux-count = <4>; - /* non-default wiring */ - amux-channel-mapping = <2 3 1 0>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>; /* rocker0-gpios */ - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>; /* rocker1-gpios */ - amux-b-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>; /* rocker-gpios */ - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <64>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - - sw5 { - gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - - sw11 { - gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBL"; - linux,code = ; // 0x2c2 - }; - sw12 { - gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBR"; - linux,code = ; // 0x2c3 - }; - - sw13 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_FN"; - linux,code = ; // 0x2c4 - }; - - sw15 { - gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw19 { - gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_SELECT"; - linux,code = ; - }; - sw20 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw22 { - gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_START"; - linux,code = ; - }; - }; - - leds: gpio-leds { - compatible = "gpio-leds"; - pinctrl-0 = <&led_pins>; - pinctrl-names = "default"; - - /* charge_red_gpio = <&gpio0 17 0>; */ - led-0 { - color = ; - default-state = "off"; - function = LED_FUNCTION_CHARGING; - linux,default-trigger = "none"; - gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; - }; - - /* charge_blue_gpio = <&gpio0 0 0>; */ - led-1 { - color = ; - default-state = "on"; - function = LED_FUNCTION_POWER; - linux,default-trigger = "default-on"; - gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; - }; - }; - - spk_amp: audio-amplifier { - compatible = "simple-audio-amplifier"; - enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&spk_amp_enable_h>; - pinctrl-names = "default"; - sound-name-prefix = "Speaker Amp"; - }; - - rk817-sound-amplified { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,aux-devs = <&spk_amp>; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Headphone", "Headphones", - "Speaker", "Internal Speakers"; - /* despite it's just a mono speaker, we need to route both Speaker Amp channels - Otherwise, the second channel stays on and keeps amp enabled */ - simple-audio-card,routing = - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speakers", "Speaker Amp OUTL", - "Internal Speakers", "Speaker Amp OUTR", - "Speaker Amp INL", "HPOL", - "Speaker Amp INR", "HPOR"; - - simple-audio-card,pin-switches = "Internal Speakers"; - - status = "disabled"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - rk817-sound-simple { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Headphone", "Headphones", - "Speaker", "Internal Speakers"; - simple-audio-card,routing = - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speakers", "SPKO"; - - status = "disabled"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc5v0_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - - vcc-phy-regulator { - compatible = "regulator-fixed"; - regulator-name = "vcc_phy"; - regulator-always-on; - regulator-boot-on; - }; - - vcc18_lcd0: vcc18-lcd0 { - compatible = "regulator-fixed"; - regulator-name = "vcc18_lcd0_n"; - gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - enable-active-high; - pinctrl-0 = <&vcc18_lcd_n>; - pinctrl-names = "default"; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_host: vcc_host { - compatible = "regulator-fixed"; - regulator-name = "vcc_host"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&vcc5_usb>; - pinctrl-names = "default"; - enable-active-high; - regulator-always-on; - regulator-boot-on; - vin-supply = <&usb_midu>; - }; -}; - -&dmc { - center-supply = <&vdd_logic>; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - internal_display: panel@0 { - compatible = "magicx,xu10-panel", "sitronix,st7703"; - iovcc-supply = <&vcc18_lcd0>; - vcc-supply = <&vcc18_lcd0>; - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&lcd_rst>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = ; - clock-output-names = "rk808-clkout1", "xin32k"; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S1_OUT>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - #sound-dai-cells = <0>; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vcc_3v0>; - vcc8-supply = <&vccsys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-name = "vdd_logic"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-initial-mode = <0x02>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <850000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-initial-mode = <0x02>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-name = "vcc_ddr"; - regulator-always-on; - regulator-boot-on; - regulator-initial-mode = <0x02>; - - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc_3v0: DCDC_REG4 { - regulator-name = "vcc_3v0"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-initial-mode = <0x02>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_1v0: LDO_REG1 { - regulator-name = "vcc_1v0"; - 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>; - }; - }; - - vcc1v8_soc: LDO_REG2 { - regulator-name = "vcc1v8_soc"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc1v0_soc: LDO_REG3 { - regulator-name = "vcc1v0_soc"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc3v0_pmu: LDO_REG4 { - regulator-name = "vcc3v0_pmu"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-name = "vccio_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc2v8_dvp: LDO_REG7 { - regulator-name = "vcc2v8_dvp"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc3v0_dvp: LDO_REG8 { - regulator-name = "vcc3v0_dvp"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vdd1v5_dvp: LDO_REG9 { - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vdd1v5_dvp"; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <1500000>; - }; - }; - - usb_midu: BOOST { - regulator-name = "usb_midu"; - regulator-min-microvolt = <4900000>; - regulator-max-microvolt = <5400000>; - regulator-always-on; - regulator-boot-on; - }; - - /* - otg_switch: OTG_SWITCH { - regulator-name = "otg_switch"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - */ - }; - - rk817_charger: charger { - monitored-battery = <&battery>; - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -/* I2S 1 Channel Used Header(P2):1(GPIO2.C3),2(.C2), 3(.C1), 4(.C5), 5(.C4) */ -&i2s1_2ch { - status = "okay"; - #sound-dai-cells = <0>; -}; - -&io_domains { - vccio1-supply = <&vcc2v8_dvp>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc1v8_soc>; - vccio4-supply = <&vcc_3v0>; - vccio5-supply = <&vcc_3v0>; - vccio6-supply = <&vcc1v8_soc>; - status = "okay"; -}; - -&isp { - status = "okay"; -}; - -&isp_mmu { - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v0_pmu>; - pmuio2-supply = <&vcc3v0_pmu>; - status = "okay"; -}; - -&csi_dphy { - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc1v8_soc>; - status = "okay"; -}; - -&sdmmc { - cap-sd-highspeed; - card-detect-delay = <800>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> ff370000 PD_SDCARD CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vqmmc-supply = <&vccio_sd>; - vmmc-supply = <&vcc_sd>; - status = "okay"; -}; - -&sdio { - cap-sd-highspeed; - max-frequency = <100000000>; - cd-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; - card-detect-delay = <800>; - supports-sd; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vqmmc-supply = <&vcc2v8_dvp>; - vmmc-supply = <&vcc3v0_dvp>; - status = "okay"; -}; - -&emmc { - status = "okay"; - no-sdio; - no-sd; - disable-wp; - non-removable; - num-slots = <1>; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = - <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - gpio-lcd { - lcd_rst: lcd-rst { - rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - vcc18-lcd { - vcc18_lcd_n: vcc18-lcd-n { - rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - vcc5-usb { - vcc5_usb: vcc5-usb { - rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - gpio-led { - led_pins: led-pins { - rockchip,pins = - <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>, /* charge_blue_gpio = <&gpio0 0 0>; */ - <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; /* charge_red_gpio = <&gpio0 17 0>; */ - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; - - speaker { - spk_amp_enable_h: spk-amp-enable-h { - rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&uart5 { - status = "okay"; -}; -&uart2 { - status = "disabled"; -}; - - -&internal_display { - compatible = "archr,generic-dsi"; - panel_description = - "G size=153,85 delays=20,20,20,120,20 format=rgb888 lanes=4 flags=0xe03", - - "M clock=50000 horizontal=720,140,80,140 vertical=720,20,4,20 default=1", - "M clock=50000 horizontal=720,140,100,140 vertical=720,20,150,20", - "M clock=50040 horizontal=720,140,112,140 vertical=720,20,140,20", - "M clock=51400 horizontal=720,140,132,140 vertical=720,20,148,20", - "M clock=50140 horizontal=720,140,90,140 vertical=720,20,40,20", - "M clock=56900 horizontal=720,140,90,140 vertical=720,20,114,20", - "M clock=50400 horizontal=720,140,92,140 vertical=720,20,10,20", - "M clock=50220 horizontal=720,140,80,140 vertical=720,20,15,20", - "M clock=54600 horizontal=720,140,112,140 vertical=720,20,57,20", - "M clock=75450 horizontal=720,140,95,140 vertical=720,20,153,20", - "M clock=75330 horizontal=720,140,80,140 vertical=720,20,15,20", - "M clock=100440 horizontal=720,140,80,140 vertical=720,20,15,20", - - "I seq=b9f11283", - "I seq=b1000000da80", - "I seq=b23c1230", - "I seq=b31010282803ff00000000", - "I seq=b480", - "I seq=b50a0a", - "I seq=b69797", - "I seq=b82622f013", - "I seq=ba338105f90e0e2000000000000000442500900a0000014f01000037", - "I seq=bc47", - "I seq=bf021100", - "I seq=c0737350500000127000", - "I seq=c12500323277e4ffffcccc7777", - "I seq=c68200bfff00ff", - "I seq=c7b8000a000000", - "I seq=c810401e02", - "I seq=cc0b", - "I seq=e0000b102c3d3f423a070d0f131513140f16000b102c3d3f423a070d0f131513140f16", - "I seq=e307070b0b0b0b00000000ff00c010", - "I seq=e9c8100a000080811231234f86a000470800000c00000000000c00000098028baf4602888888888898138baf5713888888888800000000000000000000000000", - "I seq=ea970c090909780000000000009f318ba8317588888888889f208ba820648888888888230000027100000000000000000000000000000040808100000000", - "I seq=efffff01", - "I seq=11 wait=250", - "I seq=29 wait=50"; -}; - - diff --git a/config/archr-dts/rk3326-gameconsole-r33s.dts b/config/archr-dts/rk3326-gameconsole-r33s.dts deleted file mode 100644 index 21dbab6d19..0000000000 --- a/config/archr-dts/rk3326-gameconsole-r33s.dts +++ /dev/null @@ -1,129 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * # Copyright (C) 2022-24 JELOS (https://github.com/JustEnoughLinuxOS) - */ - -/dts-v1/; -#include "rk3326-gameconsole-r3xs.dtsi" -#include "rk3326-device-group-r36.dtsi" - -/ { - model = "Game Console R33S"; - compatible = "gameconsole,r33s", "rockchip,rk3326"; - - archr,device_switch { - this = "r33s"; - }; - - builtin_gamepad: r33s_joypad { - compatible = "archr-singleadc-joypad"; - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - joypad-name = "r33s_joypad"; - joypad-product = <0x0AA2>; - joypad-revision = <0x0100>; - joypad-vendor = <0x0001>; - - status = "okay"; - amux-count = <0>; - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - pwms = <&pwm0 0 1000000000 0>; - pwm-names = "enable"; - rumble-boost-weak = <0x0000>; - rumble-boost-strong = <0x0000>; - - button-sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "DPAD-UP"; - linux,code = ; - }; - button-sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "DPAD-DOWN"; - linux,code = ; - }; - button-sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "DPAD-LEFT"; - linux,code = ; - }; - button-sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "DPAD-RIGHT"; - linux,code = ; - }; - button-sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "BTN-A"; - linux,code = ; - }; - button-sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "BTN-B"; - linux,code = ; - }; - button-sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "BTN-Y"; - linux,code = ; - }; - button-sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "BTN-X"; - linux,code = ; - }; - button-sw9 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "TOP-LEFT"; - linux,code = ; - }; - button-sw10 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "TOP-RIGHT"; - linux,code = ; - }; - button-sw11 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - label = "SELECT"; - linux,code = ; - }; - button-sw12 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "TOP-RIGHT 2"; - linux,code = ; - }; - button-sw13 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "TOP-LEFT 2"; - linux,code = ; - }; - button-sw14 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "START"; - linux,code = ; - }; - }; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - }; -}; diff --git a/config/archr-dts/rk3326-gameconsole-r36max.dts b/config/archr-dts/rk3326-gameconsole-r36max.dts deleted file mode 100644 index dfc2c6e099..0000000000 --- a/config/archr-dts/rk3326-gameconsole-r36max.dts +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * R36Max / K36 clone — alias for Generic EE clone board. - * - * ROCKNIX uses "r36max" for the K36 clone family. This DTS - * includes the eeclone base with a different model/compatible - * so U-Boot's fdtfile can reference either name. - * - * Copyright (c) 2024-present ROCKNIX (https://github.com/ROCKNIX) - * Copyright (c) 2025 Arch R - */ - -#include "rk3326-gameconsole-eeclone.dts" - -/ { - model = "Game Console R36Max"; - compatible = "gameconsole,r36max", "gameconsole,eeclone", "rockchip,rk3326"; -}; diff --git a/config/archr-dts/rk3326-gameconsole-r36s.dts b/config/archr-dts/rk3326-gameconsole-r36s.dts deleted file mode 100644 index e260fb1e80..0000000000 --- a/config/archr-dts/rk3326-gameconsole-r36s.dts +++ /dev/null @@ -1,361 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * # Copyright (C) 2022-24 JELOS (https://github.com/JustEnoughLinuxOS) - */ - -/dts-v1/; -#include "rk3326-gameconsole-r3xs.dtsi" -#include "rk3326-device-group-r36.dtsi" - -/ { - model = "Game Console R36S"; - compatible = "gameconsole,r35s", "gameconsole,r36s", "rockchip,rk3326"; - - archr,device_switch { - this = "r36s"; - }; - - /* R36S has an external speaker amplifier on GPIO3_PC4 */ - spk_amp: audio-amplifier { - compatible = "simple-audio-amplifier"; - enable-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&spk_amp_enable_h>; - pinctrl-names = "default"; - sound-name-prefix = "Speaker Amp"; - }; - - joypad: odroidgo3-joypad { - compatible = "odroidgo3-joypad"; - pwms = <&pwm0 0 200000000 0>; - pwm-names = "enable"; - rumble-boost-weak = <0x0000>; - rumble-boost-strong = <0x0000>; - - joypad-name = "r36s_Gamepad"; - joypad-product = <0x1188>; - joypad-revision = <0x0188>; - - status = "okay"; - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - pinctrl-1 = <&pwm0_pin>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - amux-count = <4>; - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <64>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* required for RG36S */ - invert-absx; - invert-absy; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw11 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBL"; - linux,code = ; // 0x2c2 - }; - sw12 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBR"; - linux,code = ; // 0x2c3 - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_FN"; - linux,code = ; // 0x2c4 - }; - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw19 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_SELECT"; - linux,code = ; - }; - sw20 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw22 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_START"; - linux,code = ; - }; - }; -}; - -/* - * Sound card layout for the R36S family. - * - * The default `rk817-sound` (overridden right below) keeps the - * Speaker Amp routing that the R36S original and most clones need. - * That node stays enabled by default so any board the overlay - * generator cannot positively re-classify still gets functional - * audio (the historic behaviour up to v2.0-rc3). - * - * Three additional variant cards are pre-defined with - * status = "disabled" so the overlay can switch to them when the - * vendor DTB does not match the default assumption: - * - * rk817-sound-amplified : external speaker amp gated by a GPIO - * (explicit re-affirmation of the default - * for boards where the overlay needs to - * rewrite the amp enable line). - * rk817-sound-simple : external amp on a regulator, no GPIO - * gate (a handful of clone batches). - * rk817-sound-spko-direct: speaker driven directly from rk817 SPKO - * with no external amp at all (Soysauce - * V05 and any board where the amp circuit - * was depopulated). Without this variant - * V05 boots with speaker muted, because - * mainline ASoC will not route to SPKO - * through a card that declares the Speaker - * widget behind an Amp. - * - * When the overlay enables one of these variants it also writes - * status = "disabled" on the default `rk817-sound`, so the kernel - * always sees exactly one active simple-audio-card. - */ -/ { - rk817-sound { - simple-audio-card,aux-devs = <&spk_amp>; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker Amp INL", "SPKO"; - }; - - rk817-sound-amplified { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,aux-devs = <&spk_amp>; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Headphone", "Headphones", - "Speaker", "Internal Speakers"; - /* The Y3506 / R36S clone speaker is mono, but the amp is - * stereo. We route both amp inputs to HPOL/HPOR so the - * second channel doesn't latch the amp on permanently. */ - simple-audio-card,routing = - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speakers", "Speaker Amp OUTL", - "Internal Speakers", "Speaker Amp OUTR", - "Speaker Amp INL", "HPOL", - "Speaker Amp INR", "HPOR"; - - simple-audio-card,pin-switches = "Internal Speakers"; - - status = "disabled"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - rk817-sound-simple { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Headphone", "Headphones", - "Speaker", "Internal Speakers"; - simple-audio-card,routing = - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speakers", "SPKO"; - - status = "disabled"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - rk817-sound-spko-direct { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Internal Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speaker", "SPKO"; - - /* Userspace can mute the speaker when headphones are - * plugged via this pin-switch. */ - simple-audio-card,pin-switches = "Internal Speaker"; - - status = "disabled"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - - }; - - }; - - speaker { - spk_amp_enable_h: spk-amp-enable-h { - rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-gameconsole-r3xs.dtsi b/config/archr-dts/rk3326-gameconsole-r3xs.dtsi deleted file mode 100644 index b9f4f17ed5..0000000000 --- a/config/archr-dts/rk3326-gameconsole-r3xs.dtsi +++ /dev/null @@ -1,545 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * # Copyright (C) 2022-24 JELOS (https://github.com/JustEnoughLinuxOS) - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - model = "Game Console R33S"; - compatible = "gameconsolec,r33s", "rockchip,rk3326"; - - aliases { - mmc0 = &sdio; - mmc1 = &sdmmc; - }; - - chosen { - stdout-path = "serial2:115200n8"; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - power-supply = <&vcc_bl>; - pwms = <&pwm1 0 25000 0>; - brightness-levels = < - 0 1 2 3 4 5 6 7 - 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 - 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255>; - default-brightness-level = <128>; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-volume-up { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3200000>; - charge-term-current-microamp = <320000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - - }; - - rk817-sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "rk817_int"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker", "SPKO"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; -}; - -&dmc { - center-supply = <&vdd_logic>; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - internal_display: panel@0 { - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&internal_display { - compatible = "gameconsole,r36s-panel", "sitronix,st7703"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = ; - clock-output-names = "rk808-clkout1", "xin32k"; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S1_OUT>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - #sound-dai-cells = <0>; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vccsys>; - vcc8-supply = <&vccsys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-name = "vdd_logic"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1150000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-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_3v3: DCDC_REG4 { - regulator-name = "vcc_3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_1v8: LDO_REG2 { - regulator-name = "vcc_1v8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vdd_1v0: LDO_REG3 { - regulator-name = "vdd_1v0"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc3v3_pmu: LDO_REG4 { - regulator-name = "vcc3v3_pmu"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-name = "vccio_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_bl: LDO_REG7 { - regulator-name = "vcc_bl"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_lcd: LDO_REG8 { - regulator-name = "vcc_lcd"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - LDO_REG9 { - /* unused */ - }; - - usb_midu: BOOST { - regulator-name = "usb_midu"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5400000>; - regulator-always-on; - regulator-boot-on; - }; - }; - - rk817_charger: charger { - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -&i2s1_2ch { - status = "okay"; -}; - -&io_domains { - vccio1-supply = <&vccio_sd>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc_3v3>; - vccio4-supply = <&vcc_3v3>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_3v3>; - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - status = "okay"; -}; - -&pwm0 { - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc_1v8>; - status = "okay"; -}; - -&sdmmc { - bus-width = <4>; - cap-sd-highspeed; - card-detect-delay = <800>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - disable-wp; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sdio { - bus-width = <4>; - cap-sd-highspeed; - card-detect-delay = <800>; - cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - disable-wp; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2m1_xfer>; - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&pinctrl { - btns { - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-gameconsole-soysauce.dts b/config/archr-dts/rk3326-gameconsole-soysauce.dts deleted file mode 100644 index 74b236bd6f..0000000000 --- a/config/archr-dts/rk3326-gameconsole-soysauce.dts +++ /dev/null @@ -1,243 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R) - * - * Device tree for R36S "soysauce" variant (Y3506 boards). - * Hardware differences from standard R36S: - * - All buttons on GPIO3 (standard uses GPIO1/GPIO2) - * - Analog mux on GPIO0 (standard uses GPIO3) - * - Panel reset GPIO: GPIO3_PB0 - * - Panel enable GPIO: GPIO1_PC2 - * - amux-channel-mapping reordered - * - Different joypad product ID (0x1100 "GO-Super Gamepad") - */ - -/dts-v1/; -#include "rk3326-gameconsole-r3xs.dtsi" -#include "rk3326-device-group-r36.dtsi" - -/ { - model = "Game Console R36S Soysauce"; - compatible = "gameconsole,soysauce", "gameconsole,r36s", "rockchip,rk3326"; - - archr,device_switch { - this = "soysauce"; - }; - - /* LED indicators (soysauce-specific) */ - leds { - compatible = "gpio-leds"; - - led-red { - gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - label = "red"; - default-state = "off"; - }; - - led-blue { - gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; - label = "blue"; - default-state = "off"; - }; - }; - - /* Volume buttons: GPIO3_PC6/PC5 on soysauce (base has GPIO2_PA0/PA1) */ - gpio-keys-vol { - button-vol-down { - gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>; - }; - - button-volume-up { - gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>; - }; - }; - - joypad: odroidgo3-joypad { - compatible = "archr-joypad", "odroidgo3-joypad"; - pwms = <&pwm0 0 200000000 0>; - pwm-names = "enable"; - rumble-boost-weak = <0x0000>; - rumble-boost-strong = <0x0000>; - - joypad-name = "GO-Super Gamepad"; - joypad-product = <0x1100>; - joypad-revision = <0x0100>; - - status = "okay"; - - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - pinctrl-1 = <&pwm0_pin>; - - /* Analog mux on GPIO0 (different from standard R36S) */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - amux-count = <4>; - amux-channel-mapping = <3 2 0 1>; - amux-a-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>; - amux-en-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; - - button-adc-scale = <2>; - button-adc-deadzone = <64>; - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - poll-interval = <10>; - - invert-absx; - invert-absy; - - /* All buttons on GPIO3 (soysauce layout) */ - sw1 { - gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; - }; - sw2 { - gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; - }; - sw3 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; - }; - sw4 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; - }; - sw5 { - gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; - }; - sw6 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; - }; - sw7 { - gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; - }; - sw8 { - gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; - }; - sw11 { - gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBL"; - linux,code = ; - }; - sw12 { - gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBR"; - linux,code = ; - }; - sw13 { - gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_MODE"; - linux,code = ; - }; - sw15 { - gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; - }; - sw16 { - gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; - }; - sw19 { - gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_SELECT"; - linux,code = ; - }; - sw20 { - gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw22 { - gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_START"; - linux,code = ; - }; - }; -}; - -/* Soysauce panel: same reset GPIO as base (GPIO3_PC0), add enable GPIO */ -&internal_display { - compatible = "archr,generic-dsi", "rocknix,generic-dsi"; - enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; -}; - -/* Soysauce uses GPIO3_PB6 for BTN-A, not sdio card detect */ -&sdio { - /delete-property/ cd-gpios; - non-removable; -}; - -&rk817_codec { - spk-ctl-gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; -}; - -&pinctrl { - btns { - btn_pins_vol: btn-pins-vol { - rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - btn_pins: btn-pins { - rockchip,pins = - <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - panel { - panel_enable: panel-enable { - rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-gameforce-chi.dts b/config/archr-dts/rk3326-gameforce-chi.dts deleted file mode 100644 index 7b47cf7017..0000000000 --- a/config/archr-dts/rk3326-gameforce-chi.dts +++ /dev/null @@ -1,811 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2024 Chris Morgan - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - model = "GameForce Chi"; - compatible = "gameforce,chi", "rockchip,rk3326"; - chassis-type = "handset"; - - aliases { - mmc0 = &sdmmc; - mmc1 = &sdio; - }; - - chosen { - stdout-path = "serial2:115200n8"; - }; - - adc_joystick: adc-joystick { - compatible = "adc-joystick"; - io-channels = <&saradc 0>, - <&saradc 1>; - poll-interval = <100>; - #address-cells = <1>; - #size-cells = <0>; - - axis@0 { - reg = <0>; - abs-flat = <10>; - abs-fuzz = <10>; - abs-range = <850 175>; - linux,code = ; - }; - - axis@1 { - reg = <1>; - abs-flat = <10>; - abs-fuzz = <10>; - abs-range = <800 190>; - linux,code = ; - }; - }; - - adc_keys: adc-keys { - compatible = "adc-keys"; - io-channels = <&saradc 2>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <1800000>; - poll-interval = <60>; - - button-1 { - label = "HAPPY1"; - linux,code = ; - press-threshold-microvolt = <15000>; - }; - - button-2 { - label = "HAPPY2"; - linux,code = ; - press-threshold-microvolt = <300000>; - }; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - power-supply = <&vcc_bl>; - pwms = <&pwm1 0 25000 0>; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3000000>; - charge-term-current-microamp = <300000>; - constant-charge-current-max-microamp = <1500000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4106000 100>, <4071000 95>, <4018000 90>, <3975000 85>, - <3946000 80>, <3908000 75>, <3877000 70>, <3853000 65>, - <3834000 60>, <3816000 55>, <3802000 50>, <3788000 45>, - <3774000 40>, <3760000 35>, <3748000 30>, <3735000 25>, - <3718000 20>, <3697000 15>, <3685000 10>, <3625000 5>, - <3400000 0>; - voltage-max-design-microvolt = <4250000>; - voltage-min-design-microvolt = <3400000>; - }; - - gpio_leds: gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&led_pins>; - - red_led: led-0 { - color = ; - gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>; - }; - - green_led: led-1 { - color = ; - gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; - }; - - blue_led: led-2 { - color = ; - gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; - }; - - white_led: led-3 { - color = ; - function = LED_FUNCTION_STATUS; - gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; - }; - - chg_led: led-4 { - color = ; - function = LED_FUNCTION_CHARGING; - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_HIGH>; - }; - - }; - - gpio_keys: gpio-keys { - compatible = "gpio-keys"; - pinctrl-0 = <&btn_pins_ctrl>; - pinctrl-names = "default"; - - button-a { - gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; - label = "EAST"; - linux,code = ; - }; - - button-b { - gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; - label = "SOUTH"; - linux,code = ; - }; - - button-down { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "DPAD-DOWN"; - linux,code = ; - }; - - button-home { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "HOME"; - linux,code = ; - }; - - button-l1 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "TL"; - linux,code = ; - }; - - button-l2 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "TL2"; - linux,code = ; - }; - - button-left { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "DPAD-LEFT"; - linux,code = ; - }; - - button-r1 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "TR"; - linux,code = ; - }; - - button-r2 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "TR2"; - linux,code = ; - }; - - button-right { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "DPAD-RIGHT"; - linux,code = ; - }; - - button-select { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "SELECT"; - linux,code = ; - }; - - button-start { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "START"; - linux,code = ; - }; - - button-up { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "DPAD-UP"; - linux,code = ; - }; - - button-x { - gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>; - label = "NORTH"; - linux,code = ; - }; - - button-y { - gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>; - label = "WEST"; - linux,code = ; - }; - }; - - multi-led { - compatible = "leds-group-multicolor"; - color = ; - function = LED_FUNCTION_KBD_BACKLIGHT; - leds = <&red_led>, <&green_led>, <&blue_led>; - }; - - spk_amp: audio-amplifier { - compatible = "simple-audio-amplifier"; - enable-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&spk_amp_enable_h>; - pinctrl-names = "default"; - sound-name-prefix = "Speaker Amp"; - }; - - sound { - compatible = "simple-audio-card"; - pinctrl-0 = <&hp_det>; - pinctrl-names = "default"; - simple-audio-card,name = "rk817_ext"; - simple-audio-card,aux-devs = <&spk_amp>; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Internal Speakers"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Internal Speakers", "Speaker Amp OUTL", - "Internal Speakers", "Speaker Amp OUTR", - "Speaker Amp INL", "HPOL", - "Speaker Amp INR", "HPOR"; - simple-audio-card,pin-switches = "Internal Speakers"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vibrator_left: pwm-vibrator-l { - compatible = "pwm-vibrator"; - pwm-names = "enable"; - pwms = <&pwm4 0 25000 0>; - }; - - vibrator_right: pwm-vibrator-r { - compatible = "pwm-vibrator"; - pwm-names = "enable"; - pwms = <&pwm5 0 25000 0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk817 1>; - clock-names = "ext_clock"; - pinctrl-0 = <&wifi_enable_h>; - pinctrl-names = "default"; - post-power-on-delay-ms = <200>; - reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; - }; - - vccsys: regulator-vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - internal_display: panel@0 { - reg = <0>; - compatible = "gameforce,chi-panel"; - backlight = <&backlight>; - iovcc-supply = <&vcc_lcd>; - vcc-supply = <&vcc_lcd>; - reset-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - #clock-cells = <1>; - clock-names = "mclk"; - clock-output-names = "rk808-clkout1", "xin32k"; - clocks = <&cru SCLK_I2S1_OUT>; - interrupt-parent = <&gpio0>; - interrupts = ; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - pinctrl-names = "default"; - #sound-dai-cells = <0>; - system-power-controller; - wakeup-source; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vcc_3v0>; - vcc8-supply = <&vccsys>; - vcc9-supply = <&dcdc_boost>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1150000>; - regulator-min-microvolt = <950000>; - regulator-name = "vdd_logic"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1350000>; - regulator-min-microvolt = <950000>; - regulator-name = "vdd_arm"; - regulator-ramp-delay = <6001>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc_ddr"; - - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc_3v0: DCDC_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3000000>; - regulator-min-microvolt = <3000000>; - regulator-name = "vcc_3v0"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_1v8: LDO_REG2 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1800000>; - regulator-min-microvolt = <1800000>; - regulator-name = "vcc_1v8"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vdd_1v0: LDO_REG3 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <1000000>; - regulator-min-microvolt = <1000000>; - regulator-name = "vdd_1v0"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc_3v0_pmu: LDO_REG4 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3000000>; - regulator-min-microvolt = <3000000>; - regulator-name = "vcc_3v0_pmu"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <1800000>; - regulator-name = "vccio_sd"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_sd"; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_bl: LDO_REG7 { - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_bl"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_lcd: LDO_REG8 { - regulator-max-microvolt = <2800000>; - regulator-min-microvolt = <2800000>; - regulator-name = "vcc_lcd"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - vcc_wifi: LDO_REG9 { - regulator-always-on; - regulator-boot-on; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; - regulator-name = "vcc_wifi"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - dcdc_boost: BOOST { - regulator-max-microvolt = <5000000>; - regulator-min-microvolt = <5000000>; - regulator-name = "dcdc_boost"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - otg_switch: OTG_SWITCH { - regulator-name = "otg_switch"; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - }; - - rk817_charger: charger { - monitored-battery = <&battery>; - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - }; -}; - -&i2s1_2ch { - status = "okay"; -}; - -&io_domains { - vccio1-supply = <&vcc_3v0_pmu>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc_3v0>; - vccio4-supply = <&vcc_3v0>; - vccio5-supply = <&vcc_3v0>; - vccio6-supply = <&vcc_3v0>; - status = "okay"; -}; - -&pinctrl { - bluetooth-pins { - bt_reset: bt-reset { - rockchip,pins = - <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; - }; - - bt_wake_dev: bt-wake-dev { - rockchip,pins = - <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - bt_wake_host: bt-wake-host { - rockchip,pins = - <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = - <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - gpio-btns { - btn_pins_ctrl: btn-pins-ctrl { - rockchip,pins = - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - gpio-leds { - led_pins: led-pins { - rockchip,pins = - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>, - <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, - <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>, - <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>, - <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int: pmic-int { - rockchip,pins = - <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = - <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = - <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = - <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; - - sdio-pwrseq { - wifi_enable_h: wifi-enable-h { - rockchip,pins = - <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - speaker { - spk_amp_enable_h: spk-amp-enable-h { - rockchip,pins = - <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc_1v8>; - pmuio2-supply = <&vcc_3v0_pmu>; - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&pwm4 { - status = "okay"; -}; - -&pwm5 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc_1v8>; - status = "okay"; -}; - -&sdio { - bus-width = <4>; - cap-sd-highspeed; - cap-sdio-irq; - disable-wp; - keep-power-in-suspend; - mmc-pwrseq = <&sdio_pwrseq>; - no-mmc; - no-sd; - non-removable; - sd-uhs-sdr104; - status = "okay"; -}; - -&sdmmc { - cap-mmc-highspeed; - cap-sd-highspeed; - no-sdio; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sfc { - #address-cells = <1>; - pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; - pinctrl-names = "default"; - #size-cells = <0>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <108000000>; - spi-rx-bus-width = <2>; - spi-tx-bus-width = <1>; - }; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -/* - * The right ADC joystick exists connected to an unknown ADC - * controller which can be communicated with via uart0. This ADC device - * is an 8-pin SOIC with no markings located right next to the left ADC - * joystick ribbon cable. The pinout for this ADC controller appears to - * be pin 1 - VCC (2.8v), pin 2 - 1.8v (clk maybe?), pin 3 - GPIO 10, - * pin 4 - unknown, pin 5 - unknown, pin 6 - analog in, pin 7 - analog in, - * pin 8 - ground. There is currently a userspace UART driver for this - * device but it only works with the BSP joystick driver. - */ -&uart0 { - status = "okay"; -}; - -/* - * Bluetooth was not working on BSP and is not currently working on - * mainline due to missing firmware. Bluetooth requires removal of DMA - * or else it will not probe. - */ -&uart1 { - /delete-property/ dma-names; - /delete-property/ dmas; - uart-has-rtscts; - status = "okay"; - - bluetooth: bluetooth { - compatible = "realtek,rtl8723ds-bt"; - device-wake-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; - enable-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; - host-wake-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; - pinctrl-0 = <&bt_reset>, <&bt_wake_dev>, <&bt_wake_host>; - pinctrl-names = "default"; - }; -}; - -&uart2 { - pinctrl-0 = <&uart2m1_xfer>; - pinctrl-names = "default"; - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; diff --git a/config/archr-dts/rk3326-magicx-xu-mini-m.dts b/config/archr-dts/rk3326-magicx-xu-mini-m.dts deleted file mode 100644 index ad4841e365..0000000000 --- a/config/archr-dts/rk3326-magicx-xu-mini-m.dts +++ /dev/null @@ -1,109 +0,0 @@ -/// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2024-present ROCKNIX (https://github.com/ROCKNIX) - * Copyright (c) 2024 Olivier Schonken - */ - -#include "rk3326-magicx-xu10.dts" - -/ { - model = "MagicX XU Mini M"; - compatible = "magicx,xu-mini-m", "rockchip,rk3326"; -}; - -&battery { - charge-full-design-microamp-hours = <2600000>; -}; - -&dsi { - internal_display: panel@0 { - compatible = "archr,generic-dsi"; - panel_description = - "G size=69,139 delays=5,20,20,120,20 format=rgb888 lanes=2 flags=0xe03", - - "M clock=25000 horizontal=480,60,10,54 vertical=640,20,10,20 default=1", - "M clock=25200 horizontal=480,60,22,54 vertical=640,20,139,20", - "M clock=25000 horizontal=480,60,31,54 vertical=640,20,120,20", - "M clock=25660 horizontal=480,60,22,54 vertical=640,20,153,20", - "M clock=25300 horizontal=480,60,31,54 vertical=640,20,24,20", - "M clock=28590 horizontal=480,60,15,54 vertical=640,20,106,20", - "M clock=25380 horizontal=480,60,17,54 vertical=640,20,13,20", - "M clock=25410 horizontal=480,60,11,54 vertical=640,20,20,20", - "M clock=29490 horizontal=480,60,24,54 vertical=640,20,114,20", - "M clock=33520 horizontal=480,60,36,54 vertical=640,20,25,20", - "M clock=38430 horizontal=480,60,16,54 vertical=640,20,20,20", - "M clock=50820 horizontal=480,60,11,54 vertical=640,20,20,20", - - "I seq=ff7701000013", - "I seq=ef08", - "I seq=ff7701000010", - "I seq=c04f00", "I seq=c11002", "I seq=c22002", "I seq=cc10", - "I seq=b006161e0e12060a0809230412102b311f", - "I seq=b1060f160d100704090720051210262f1f", - "I seq=ff7701000011", - "I seq=b065", "I seq=b185", "I seq=b282", "I seq=b380", "I seq=b542", "I seq=b785", - "I seq=b820", - "I seq=c178", "I seq=c278", - "I seq=d088", - "I seq=e0000002", - "I seq=e104a006a005a007a0004444", - "I seq=e2000000000000000000000000", - "I seq=e300002222", - "I seq=e44444", - "I seq=e50c90a0a00e92a0a0088ca0a00a8ea0a0", - "I seq=e600002222", - "I seq=e74444", - "I seq=e80d91a0a00f93a0a0098da0a00b8fa0a0", - "I seq=eb0000e4e4440040", - "I seq=edfff5476f0ba1abffffba1ab0f6745fff", - "I seq=ef080808403f64", - "I seq=ff7701000013", - "I seq=e6167c", "I seq=e8000e", - "I seq=e8000c wait=50", - "I seq=e80000", - "I seq=ff7701000000", - "I seq=11 wait=150", - "I seq=29 wait=120"; - rotation = <90>; - }; -}; - -&joypad { - joypad-name = "XU Mini M Gamepad"; - - invert-absrx; - /delete-property/ invert-absx; - - sw5 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - }; - sw6 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-A"; - }; - sw7 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - }; - sw8 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - }; - sw16 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - }; - sw17 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - }; -}; - -&pinctrl { - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; -}; - - diff --git a/config/archr-dts/rk3326-magicx-xu10.dts b/config/archr-dts/rk3326-magicx-xu10.dts deleted file mode 100644 index 91e06ffd17..0000000000 --- a/config/archr-dts/rk3326-magicx-xu10.dts +++ /dev/null @@ -1,872 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - model = "MagicX XU10"; - compatible = "magicx,xu10", "rockchip,rk3326"; - - aliases { - mmc0 = &sdio; - mmc1 = &sdmmc; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&pwm1 0 25000 0>; - brightness-levels = < - 0 1 2 3 4 5 6 7 - 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 - 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255>; - default-brightness-level = <128>; - }; - - joypad: xu10-joypad { - compatible = "xu10-joypad"; - - joypad-name = "XU10 Gamepad"; - joypad-product = <0x0200>; - joypad-revision = <0x0010>; - - status = "okay"; - /* - - xu10-joypad sysfs list - - * for poll device interval(ms) - /sys/devices/platform/odroidgo3_joypad/poll_interval [rw] - ex) echo 20 > poll_interval - * for button-adc-fuzz - /sys/devices/platform/odroidgo3_joypad/adc_fuzz [r] - * for button-adc-flat - /sys/devices/platform/odroidgo3_joypad/adc_flat [r] - - * for report control(1:enable, 0:disable) - /sys/devices/platform/odroidgo3_joypad/enable [rw] - * for adc calibration value setup(current adcs value -> cal value) - /sys/devices/platform/odroidgo3_joypad/adc_cal [rw] - ex) echo 0 > adc_cal - * for amux data debug - * Joypad driver is disabled when using this sysfs. - /sys/devices/platform/odroidgo3_joypad/amux_debug [rw] - ex) echo 0 > amux_debug --> select amux channel - ex) cat amux_debug --> get adc data of seleted channel - */ - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* Analog mux define */ - io-channel-names = "joy_left", "joy_right"; - io-channels = <&saradc 1>, <&saradc 2>; - - /* adc mux channel count */ - amux-count = <4>; - - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>; - - /* adc mux enable gpio */ - amux-en-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <180>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* required for XU10 */ - invert-absx; - invert-absy; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - *** MagicX XU10 - layoout *** - |-------------------------------| - | sw14 sw17 sw16 sw15 | - |-----|-------------------|-----| - | | | | - |vol+ | | sw13| - |vol- | | | - | | LCD Display | | - | | | | - | | | | - | |-------------------| | - | sw9 sw10 | - | | - | sw1 sw7 | - | sw3 sw4 sw8 sw6 | - | sw2 sw5 | - | | - | sw11 sw12 | - | | - |-------|---------------|-------| - */ - - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-A"; - linux,code = ; // 0x130 - }; - sw6 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x131 - }; - sw7 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x133 - }; - sw8 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x134 - }; - sw9 { - gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-SELECT"; - linux,code = ; // 0x13a - }; - sw10 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-START"; - linux,code = ; // 0x13b - }; - sw11 { - gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBL"; - linux,code = ; // 0x13d - }; - sw12 { - gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBR"; - linux,code = ; // 0x13e - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-G"; - linux,code = ; // 0x2c0 - }; - sw14 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-LEFT"; - linux,code = ; // 0x136 - }; - sw15 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-RIGHT"; - linux,code = ; // 0x137 - }; - sw16 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-RIGHT2"; - linux,code = ; // 0x139 - }; - sw17 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-LEFT2"; - linux,code = ; // 0x138 - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3000000>; - charge-term-current-microamp = <200000>; - constant-charge-current-max-microamp = <1500000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <100000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3300000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = - <4046950 100>, <4001920 95>, <3967900 90>, <3940000 85>, - <3910000 80>, <3870000 75>, <3830000 70>, <3790000 65>, - <3750000 60>, <3720000 55>, <3690000 50>, <3650000 45>, - <3610000 40>, <3570000 35>, <3540000 30>, <3500000 25>, - <3460000 20>, <3420000 15>, <3380000 10>, <3340000 5>, - <3300000 0>; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-vol-up { - gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; - - leds: gpio-leds { - compatible = "gpio-leds"; - pinctrl-0 = <&led_pins>; - pinctrl-names = "default"; - - led-0 { - color = ; - default-state = "off"; - function = LED_FUNCTION_CHARGING; - gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; - }; - - led-1 { - color = ; - default-state = "off"; - function = LED_FUNCTION_STATUS; - gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; - }; - }; - - rk817-sound { - compatible = "simple-audio-card"; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - simple-audio-card,name = "rk817_int"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker", "SPKO"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; - - vcc-phy-regulator { - compatible = "regulator-fixed"; - regulator-name = "vcc_phy"; - regulator-always-on; - regulator-boot-on; - }; - - vcc18_lcd0: vcc18-lcd0 { - compatible = "regulator-fixed"; - regulator-name = "vcc18_lcd0_n"; - gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - enable-active-high; - pinctrl-0 = <&vcc18_lcd_n>; - pinctrl-names = "default"; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_host: vcc_host { - compatible = "regulator-fixed"; - regulator-name = "vcc_host"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-always-on; - regulator-boot-on; - vin-supply = <&usb_midu>; - }; -}; - -&dmc { - center-supply = <&vdd_logic>; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - internal_display: panel@0 { - compatible = "magicx,xu10-panel", "sitronix,st7703"; - iovcc-supply = <&vcc18_lcd0>; - vcc-supply = <&vcc18_lcd0>; - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&lcd_rst>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = ; - clock-output-names = "rk808-clkout1", "xin32k"; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S1_OUT>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - #sound-dai-cells = <0>; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vcc_3v0>; - vcc8-supply = <&vccsys>; - vcc9-supply = <&usb_midu>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-name = "vdd_logic"; - regulator-min-microvolt = <850000>; - regulator-max-microvolt = <1150000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <850000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-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_3v0: DCDC_REG4 { - regulator-name = "vcc_3v0"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_1v0: LDO_REG1 { - regulator-name = "vcc_1v0"; - 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>; - }; - }; - - vcc1v8_soc: LDO_REG2 { - regulator-name = "vcc1v8_soc"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc1v0_soc: LDO_REG3 { - regulator-name = "vcc1v0_soc"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc3v0_pmu: LDO_REG4 { - regulator-name = "vcc3v0_pmu"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-name = "vccio_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc2v8_dvp: LDO_REG7 { - regulator-name = "vcc2v8_dvp"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - vcc3v0_dvp: LDO_REG8 { - regulator-name = "vcc3v0_dvp"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vdd1v5_dvp: LDO_REG9 { - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-name = "vdd1v5_dvp"; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <1500000>; - }; - }; - - usb_midu: BOOST { - regulator-name = "usb_midu"; - regulator-min-microvolt = <4700000>; - regulator-max-microvolt = <5400000>; - regulator-always-on; - regulator-boot-on; - }; - - }; - - rk817_charger: charger { - monitored-battery = <&battery>; - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -/* I2S 1 Channel Used Header(P2):1(GPIO2.C3),2(.C2), 3(.C1), 4(.C5), 5(.C4) */ -&i2s1_2ch { - status = "okay"; - #sound-dai-cells = <0>; -}; - -&io_domains { - vccio1-supply = <&vcc1v8_soc>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc3v0_dvp>; - vccio4-supply = <&vcc_3v0>; - vccio5-supply = <&vcc_3v0>; - vccio6-supply = <&vcc_3v0>; - status = "okay"; -}; - -&isp { - status = "okay"; -}; - -&isp_mmu { - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v0_pmu>; - pmuio2-supply = <&vcc3v0_pmu>; - status = "okay"; -}; - -&csi_dphy { - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc1v8_soc>; - status = "okay"; -}; - -&sdmmc { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> ff370000 PD_SDCARD CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sdio { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -/* FIQ Header(P2): 2(RXD:GPIO2.B4),3(TXD:.B6) */ -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2m1_xfer>; - status = "okay"; -}; - -&usb20_otg { - status = "okay"; - dr_mode = "otg"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - btn_pins_vol: btn-pins-vol { - rockchip,pins = - <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>, - <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - gpio-lcd { - lcd_rst: lcd-rst { - rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - vcc18-lcd { - vcc18_lcd_n: vcc18-lcd-n { - rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - gpio-led { - led_pins: led-pins { - rockchip,pins = - <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>, - <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-odroid-go.dtsi b/config/archr-dts/rk3326-odroid-go.dtsi deleted file mode 100644 index 6195402b5b..0000000000 --- a/config/archr-dts/rk3326-odroid-go.dtsi +++ /dev/null @@ -1,568 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include -#include -#include -#include -#include "rk3326.dtsi" - -/ { - aliases { - mmc0 = &sdmmc; - }; - - chosen { - stdout-path = "serial2:115200n8"; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - power-supply = <&vcc_bl>; - pwms = <&pwm1 0 25000 0>; - brightness-levels = < - 0 1 2 3 4 5 6 7 - 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 - 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 - 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 - 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 - 120 121 122 123 124 125 126 127 - 128 129 130 131 132 133 134 135 - 136 137 138 139 140 141 142 143 - 144 145 146 147 148 149 150 151 - 152 153 154 155 156 157 158 159 - 160 161 162 163 164 165 166 167 - 168 169 170 171 172 173 174 175 - 176 177 178 179 180 181 182 183 - 184 185 186 187 188 189 190 191 - 192 193 194 195 196 197 198 199 - 200 201 202 203 204 205 206 207 - 208 209 210 211 212 213 214 215 - 216 217 218 219 220 221 222 223 - 224 225 226 227 228 229 230 231 - 232 233 234 235 236 237 238 239 - 240 241 242 243 244 245 246 247 - 248 249 250 251 252 253 254 255>; - default-brightness-level = <128>; - }; - - /* led-1 is wired directly to output of always-on regulator */ - - gpio_led: gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&red_led_pin>; - - red_led: led-3 { - color = ; - gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; - function = LED_FUNCTION_CHARGING; - }; - }; - - pwm_led: led-controller { - compatible = "pwm-leds"; - - blue_led: led-2 { - color = ; - function = LED_FUNCTION_STATUS; - linux,default-trigger = "heartbeat"; - max-brightness = <255>; - pwms = <&pwm3 0 25000 0>; - }; - }; - - rk817-sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "rk817_int"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker", "SPKO"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: regulator-vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; - - vcc_host: regulator-vcc-host { - compatible = "regulator-fixed"; - regulator-name = "vcc_host"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-always-on; - regulator-boot-on; - vin-supply = <&usb_midu>; - }; -}; - -&dmc { - center-supply = <&vdd_logic>; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>; -}; - -&display_subsystem { - status = "okay"; -}; - -&dsi { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - internal_display: panel@0 { - reg = <0>; - backlight = <&backlight>; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = ; - clock-output-names = "rk808-clkout1", "xin32k"; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S1_OUT>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - #sound-dai-cells = <0>; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vccsys>; - vcc8-supply = <&vccsys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-name = "vdd_logic"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1150000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-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_3v3: DCDC_REG4 { - regulator-name = "vcc_3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_1v8: LDO_REG2 { - regulator-name = "vcc_1v8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vdd_1v0: LDO_REG3 { - regulator-name = "vdd_1v0"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1000000>; - }; - }; - - vcc3v3_pmu: LDO_REG4 { - regulator-name = "vcc3v3_pmu"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-name = "vccio_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_bl: LDO_REG7 { - regulator-name = "vcc_bl"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_lcd: LDO_REG8 { - regulator-name = "vcc_lcd"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - LDO_REG9 { - /* unused */ - }; - - usb_midu: BOOST { - regulator-name = "usb_midu"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5400000>; - regulator-always-on; - regulator-boot-on; - }; - }; - - rk817_charger: charger { - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */ -&i2c1 { - clock-frequency = <400000>; - status = "okay"; -}; - -/* I2S 1 Channel Used */ -&i2s1_2ch { - status = "okay"; -}; - -&io_domains { - vccio1-supply = <&vcc_3v3>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc_3v3>; - vccio4-supply = <&vcc_3v3>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_3v3>; - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&pwm3 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc_1v8>; - status = "okay"; -}; - -&sdmmc { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sfc { - pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; - pinctrl-names = "default"; - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <108000000>; - spi-rx-bus-width = <2>; - spi-tx-bus-width = <1>; - }; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "okay"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */ -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_xfer &uart1_cts>; - status = "okay"; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2m1_xfer>; - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - leds { - red_led_pin: red-led-pin { - rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-odroid-go2-v11.dts b/config/archr-dts/rk3326-odroid-go2-v11.dts deleted file mode 100644 index 489e0e2d0f..0000000000 --- a/config/archr-dts/rk3326-odroid-go2-v11.dts +++ /dev/null @@ -1,310 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "ODROID-GO Advance Black Edition"; - compatible = "hardkernel,rk3326-odroid-go2-v11", "rockchip,rk3326"; - - aliases { - mmc1 = &sdio; - }; - - gpio_keys: volume-keys { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - volume-up-button { - label = "VOLUMEUP"; - linux,code = ; - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - - }; - volume-down-button { - label = "VOLUMEDOWN"; - linux,code = ; - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - - }; - }; - - joypad: odroidgo2-joypad { - compatible = "odroidgo2-v11-joypad"; - - /* - - odroidgo2-joypad sysfs list - - * for poll device interval(ms) - /sys/devices/platform/odroidgo2_joypad/poll_interval [rw] - * for button-adc-fuzz - /sys/devices/platform/odroidgo2_joypad/adc_fuzz [r] - * for button-adc-flat - /sys/devices/platform/odroidgo2_joypad/adc_flat [r] - - * for report control(1:enable, 0:disable) - /sys/devices/platform/odroidgo2_joypad/enable [rw] - * for adc calibration value setup(1:current adcs value -> cal value) - /sys/devices/platform/odroidgo2_joypad/adc_cal [rw] - */ - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* JOY_X, JOY_Y Channel define */ - io-channel-names = "joy_x", "joy_y"; - io-channels = <&saradc 1>, <&saradc 2>; - - /* adc channel count */ - button-adc-count = <2>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <20>; - - /* - joy-stick voltage range - /sys/devices/platform/ff288000.saradc/iio:device0 - adc-x : in_voltage1_raw - adc-y : in_voltage2_raw - - range calculate. - (adc raw max value - adc raw min value) * scale * 1.7515 - */ - button-adc-x-range = <1800>; - button-adc-y-range = <1800>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - *** ODROIDGO2-Advance Switch layoout *** - |------------------------------------------------| - | sw15 sw16 | - | sw20 sw21 | - |------------------------------------------------| - | sw1 |-------------------| sw8 | - | sw3 sw4 | | sw7 sw5 | - | sw2 | LCD Display | sw6 | - | | | | - | |-------------------| | - | sw9 sw10 vol- vol+ sw13 sw14 | - |------------------------------------------------| - */ - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw9 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-SELECT"; - linux,code = ; // 0x2c0 - }; - sw10 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBL"; - linux,code = ; // 0x2c1 - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBR"; - linux,code = ; // 0x2c4 - }; - sw14 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-START"; - linux,code = ; // 0x13c - }; - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw20 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3000000>; - charge-term-current-microamp = <300000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_pwrseq_pins>; - reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - post-power-on-delay-ms = <300>; - power-off-delay-us = <200000>; - }; -}; - -&internal_display { - compatible = "elida,kd35t133"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; - rotation = <270>; -}; - -&rk817 { - regulators { - vcc_wifi: LDO_REG9 { - regulator-name = "vcc_wifi"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - }; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&sdio { - #address-cells = <1>; - #size-cells = <0>; - bus-width = <4>; - cap-sd-highspeed; - cap-sdio-irq; - disable-wp; - keep-power-in-suspend; - non-removable; - vmmc-supply = <&vcc_wifi>; - mmc-pwrseq = <&wifi_pwrseq>; - status = "okay"; - - esp8089: wifi@1 { - compatible = "esp,esp8089"; - reg = <1>; - esp,crystal-26M-en = <1>; - }; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - wifi { - wifi_pwrseq_pins: wifi-pwrseq-pins { - rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-odroid-go2.dts b/config/archr-dts/rk3326-odroid-go2.dts deleted file mode 100644 index f142737a01..0000000000 --- a/config/archr-dts/rk3326-odroid-go2.dts +++ /dev/null @@ -1,235 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "ODROID-GO Advance"; - compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326"; - - gpio_keys: volume-keys { - compatible = "gpio-keys-polled"; - poll-interval = <5>; - autorepeat; - - volume-up-button { - label = "VOLUME-UP"; - linux,code = ; - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - - }; - volume-down-button { - label = "VOLUME-DOWN"; - linux,code = ; - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - - }; - }; - - joypad: odroidgo2-joypad { - compatible = "odroidgo2-joypad"; - - /* - - odroidgo2-joypad sysfs list - - * for poll device interval(ms) - /sys/devices/platform/odroidgo2_joypad/poll_interval [rw] - * for button-adc-fuzz - /sys/devices/platform/odroidgo2_joypad/adc_fuzz [r] - * for button-adc-flat - /sys/devices/platform/odroidgo2_joypad/adc_flat [r] - - * for report control(1:enable, 0:disable) - /sys/devices/platform/odroidgo2_joypad/enable [rw] - * for adc calibration value setup(1:current adcs value -> cal value) - /sys/devices/platform/odroidgo2_joypad/adc_cal [rw] - */ - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* JOY_X, JOY_Y Channel define */ - io-channel-names = "joy_x", "joy_y"; - io-channels = <&saradc 1>, <&saradc 2>; - - /* adc channel count */ - button-adc-count = <2>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <20>; - - /* - joy-stick voltage range - /sys/devices/platform/ff288000.saradc/iio:device0 - adc-x : in_voltage1_raw - adc-y : in_voltage2_raw - - range calculate. - (adc raw max value - adc raw min value) * scale * 1.7515 - */ - button-adc-x-range = <1800>; - button-adc-y-range = <1800>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - *** ODROIDGO2-Advance Switch layoout *** - |------------------------------------------------| - | sw15 sw16 | - |------------------------------------------------| - | sw1 |-------------------| sw8 | - | sw3 sw4 | | sw7 sw5 | - | sw2 | LCD Display | sw6 | - | | | | - | |-------------------| | - | sw9 sw10 vol- vol+ sw13 sw14 | - |------------------------------------------------| - */ - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw9 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO F1"; - linux,code = ; // 0x2c0 - }; - sw10 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO F2"; - linux,code = ; // 0x2c1 - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO F5"; - linux,code = ; // 0x2c4 - }; - sw14 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO F6"; - linux,code = ; // 0x13c - }; - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3000000>; - charge-term-current-microamp = <300000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; -}; - -&internal_display { - compatible = "elida,kd35t133"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; - rotation = <270>; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-odroid-go3.dts b/config/archr-dts/rk3326-odroid-go3.dts deleted file mode 100644 index c3099f9cfe..0000000000 --- a/config/archr-dts/rk3326-odroid-go3.dts +++ /dev/null @@ -1,289 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "ODROID-GO Super"; - compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326"; - - joypad: odroidgo3-joypad { - compatible = "odroidgo3-joypad"; - - joypad-name = "odroidgo3_joypad"; - joypad-product = <0x0001>; - joypad-revision = <0x0101>; - - status = "okay"; - /* - - odroidgo3-joypad sysfs list - - * for poll device interval(ms) - /sys/devices/platform/odroidgo3_joypad/poll_interval [rw] - ex) echo 20 > poll_interval - * for button-adc-fuzz - /sys/devices/platform/odroidgo3_joypad/adc_fuzz [r] - * for button-adc-flat - /sys/devices/platform/odroidgo3_joypad/adc_flat [r] - - * for report control(1:enable, 0:disable) - /sys/devices/platform/odroidgo3_joypad/enable [rw] - * for adc calibration value setup(current adcs value -> cal value) - /sys/devices/platform/odroidgo3_joypad/adc_cal [rw] - ex) echo 0 > adc_cal - * for amux data debug - * Joypad driver is disabled when using this sysfs. - /sys/devices/platform/odroidgo3_joypad/amux_debug [rw] - ex) echo 0 > amux_debug --> select amux channel - ex) cat amux_debug --> get adc data of seleted channel - */ - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - amux-count = <4>; - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <64>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <180>; - abs_x-n-tuning = <180>; - - abs_y-p-tuning = <180>; - abs_y-n-tuning = <170>; - - abs_rx-p-tuning = <180>; - abs_rx-n-tuning = <180>; - - abs_ry-p-tuning = <180>; - abs_ry-n-tuning = <170>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - *** ODROIDGO3-Advance Switch layoout *** - |------------------------------------------------| - | sw15 sw21 sw10 sw9 sw20 sw16 | - |------------------------------------------------| - | sw19 sw22 | - | |-------------------| | - | sw1 | | sw8 | - | sw3 sw4 | | sw7 sw5 | - | sw2 | LCD Display | sw6 | - | | | | - | | | | - | |-------------------| | - | sw11 sw12 | sd-slot | sw13 sw14 | - |-------------------| |------------------| - */ - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw11 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO F3"; - linux,code = ; // 0x2c2 - }; - sw12 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO F4"; - linux,code = ; // 0x2c3 - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO F5"; - linux,code = ; // 0x2c4 - }; - sw14 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO F6"; - linux,code = ; // 0x13c - }; - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw19 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - label = "GPIO F1"; - linux,code = ; - }; - sw20 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw22 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO F2"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <4000000>; - charge-term-current-microamp = <300000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-volume-up { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; -}; - -&internal_display { - compatible = "elida,kd50t048a", "sitronix,st7701"; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; - IOVCC-supply = <&vcc_lcd>; - VCC-supply = <&vcc_lcd>; - rotation = <270>; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-powkiddy-rgb10.dts b/config/archr-dts/rk3326-powkiddy-rgb10.dts deleted file mode 100644 index de0f069fdd..0000000000 --- a/config/archr-dts/rk3326-powkiddy-rgb10.dts +++ /dev/null @@ -1,282 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "Powkiddy RGB10"; - compatible = "powkiddy,rk3326-rgb10", "rockchip,rk3326"; - - aliases { - mmc1 = &sdio; - }; - - joypad: odroidgo2-joypad { - compatible = "odroidgo2-v11-joypad"; - - /* - - odroidgo2-joypad sysfs list - - * for poll device interval(ms) - /sys/devices/platform/odroidgo2_joypad/poll_interval [rw] - * for button-adc-fuzz - /sys/devices/platform/odroidgo2_joypad/adc_fuzz [r] - * for button-adc-flat - /sys/devices/platform/odroidgo2_joypad/adc_flat [r] - - * for report control(1:enable, 0:disable) - /sys/devices/platform/odroidgo2_joypad/enable [rw] - * for adc calibration value setup(1:current adcs value -> cal value) - /sys/devices/platform/odroidgo2_joypad/adc_cal [rw] - */ - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* JOY_X, JOY_Y Channel define */ - io-channel-names = "joy_x", "joy_y"; - io-channels = <&saradc 1>, <&saradc 2>; - - /* adc channel count */ - button-adc-count = <2>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <20>; - - /* - joy-stick voltage range - /sys/devices/platform/ff288000.saradc/iio:device0 - adc-x : in_voltage1_raw - adc-y : in_voltage2_raw - - range calculate. - (adc raw max value - adc raw min value) * scale * 1.7515 - */ - button-adc-x-range = <1800>; - button-adc-y-range = <1800>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - *** RGB10 Switch layoout *** - |------------------------------------------------| - | sw15 sw16 | - | sw20 sw21 | - |------------------------------------------------| - | sw1 sw10 |-------------------| sw13 sw8 | - | sw3 sw4 | | sw7 sw5 | - | sw2 | LCD Display | sw6 | - | | | | - | |-------------------| | - |------------------------------------------------| - */ - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw9 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-SELECT"; - linux,code = ; // 0x2c0 - }; - sw10 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBL"; - linux,code = ; // 0x2c1 - }; - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-THUMBR"; - linux,code = ; // 0x2c4 - }; - sw14 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-START"; - linux,code = ; // 0x13c - }; - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw20 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <2800000>; - charge-term-current-microamp = <280000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_pwrseq_pins>; - /*reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;*/ - }; -}; - -&internal_display { - compatible = "elida,kd35t133"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; - rotation = <270>; -}; - -&rk817 { - regulators { - vcc_wifi: LDO_REG9 { - regulator-name = "vcc_wifi"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - }; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&sdio { - #address-cells = <1>; - #size-cells = <0>; - bus-width = <4>; - cap-sd-highspeed; - cap-sdio-irq; - disable-wp; - keep-power-in-suspend; - non-removable; - vmmc-supply = <&vcc_wifi>; - status = "okay"; - - esp8089: wifi@1 { - compatible = "esp,esp8089"; - reg = <1>; - esp,crystal-26M-en = <2>; - }; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - wifi { - wifi_pwrseq_pins: wifi-pwrseq-pins { - rockchip,pins = /*<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,*/ - <3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-powkiddy-rgb10x.dts b/config/archr-dts/rk3326-powkiddy-rgb10x.dts deleted file mode 100644 index debc628194..0000000000 --- a/config/archr-dts/rk3326-powkiddy-rgb10x.dts +++ /dev/null @@ -1,214 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2024 ROCKNIX - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" -#include "retrogame_joypad_s2_f1.dtsi" -#include "rk3326-device-group-r36.dtsi" - -/ { - model = "Powkiddy RGB10X"; - compatible = "powkiddy,rk3326-rgb10x", "rockchip,rk3326"; - - archr,device_switch { - this = "rgb10x"; - }; - - aliases { - mmc1 = &sdio; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <2800000>; - charge-term-current-microamp = <280000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-volume-up { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; -}; - -&joypad { - compatible = "archr-singleadc-joypad"; - joypad-name = "retrogame_joypad_s1_f2"; /* distinct name to indicate there is 1 stick and 2 fn buttons */ - joypad-product = <0x1112>; /* 11 inherited, 1 for number of sticks, 2 for number of FN */ - status = "okay"; - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - /* despite there is only left stick, amux-count needs to be 4, */ - /* because amux 0 and 1 are hardcoded as RX and RY in the driver */ - amux-count = <4>; - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <200>; - abs_x-n-tuning = <200>; - - abs_y-p-tuning = <200>; - abs_y-n-tuning = <200>; - - abs_rx-p-tuning = <200>; - abs_rx-n-tuning = <200>; - - abs_ry-p-tuning = <200>; - abs_ry-n-tuning = <200>; - - /* required for RGB10X */ - invert-absx; - invert-absy; - - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - up { gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; }; - down { gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; }; - left { gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; }; - right { gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; }; - - a { gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; }; - b { gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; }; - x { gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; }; - y { gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; }; - - tl { gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; }; - tr { gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; }; - tr2 { gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; }; - tl2 { gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; }; - - select{ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; }; - start { gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; }; - - thumbl{ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; }; - - /* Plus and Minus face buttons are mapped to mode and thumbr */ - mode { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO MINUS"; - }; - thumbr { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO PLUS"; - }; -}; - -&internal_display { - compatible = "powkiddy,rk2023-panel", "newvision,nv3051d"; - vdd-supply = <&vcc_lcd>; -}; - -&io_domains { - vccio1-supply = <&vccio_sd>; -}; - -/delete-node/ &pwm3; -/delete-node/ &pwm_led; - -&red_led { - gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>; -}; - -&red_led_pin { - rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; -}; - -&rk817_charger { - monitored-battery = <&battery>; -}; - -&sdio { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&vcc_sd { - regulator-max-microvolt = <3000000>; - regulator-min-microvolt = <1800000>; -}; - -&vccio_sd { - regulator-max-microvolt = <1800000>; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/rk3326-powkiddy-rgb20s.dts b/config/archr-dts/rk3326-powkiddy-rgb20s.dts deleted file mode 100644 index 93f149e62a..0000000000 --- a/config/archr-dts/rk3326-powkiddy-rgb20s.dts +++ /dev/null @@ -1,375 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (c) 2019 Hardkernel Co., Ltd - * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH - * Copyright (c) 2022 Maya Matuszczyk - */ - -/dts-v1/; -#include "rk3326-odroid-go.dtsi" - -/ { - model = "Powkiddy RGB20S"; - compatible = "powkiddy,rgb20s", "rockchip,rk3326"; - - aliases { - mmc0 = &sdio; - mmc1 = &sdmmc; - }; - - gpio-keys-vol { - compatible = "gpio-keys"; - autorepeat; - pinctrl-0 = <&btn_pins_vol>; - pinctrl-names = "default"; - - button-vol-down { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "VOLUMEDOWN"; - linux,code = ; - }; - - button-volume-up { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "VOLUMEUP"; - linux,code = ; - }; - }; - - joypad: joypad { - compatible = "archr-singleadc-joypad"; - - pwms = <&pwm0 0 200000000 0>; - pwm-names = "enable"; - rumble-boost-weak = <0x0000>; - rumble-boost-strong = <0x0000>; - - joypad-name = "r36s_Gamepad"; - joypad-product = <0x1188>; - joypad-revision = <0x0188>; - joypad-vendor = <0x0001>; - - status = "okay"; - - /* gpio pincontrol setup */ - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - pinctrl-1 = <&pwm0_pin>; - - /* Analog mux define */ - io-channel-names = "amux_adc"; - io-channels = <&saradc 1>; - - /* adc mux channel count */ - amux-count = <4>; - /* non-default wiring */ - amux-channel-mapping = <0 1 2 3>; - /* adc mux select(a,b) gpio */ - amux-a-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; - amux-b-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - /* adc mux enable gpio */ - amux-en-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>; - - /* adc calculate scale */ - button-adc-scale = <2>; - - /* adc deadzone range */ - button-adc-deadzone = <64>; - - /* - specifies fuzz value that is used to filter noise from - the event stream. - */ - button-adc-fuzz = <32>; - button-adc-flat = <32>; - - /* - Analog Stick data tuning value(precent) - p = positive direction, n = negative direction - report value = (real_adc_data * tuning_value) / 100 - */ - abs_x-p-tuning = <400>; - abs_x-n-tuning = <400>; - - abs_y-p-tuning = <400>; - abs_y-n-tuning = <400>; - - abs_rx-p-tuning = <400>; - abs_rx-n-tuning = <400>; - - abs_ry-p-tuning = <400>; - abs_ry-n-tuning = <400>; - - /* poll device interval (ms), adc read interval */ - poll-interval = <10>; - - /* required for RG351MP */ - invert-absx; - invert-absy; - - /* gpio button auto repeat set value : default disable */ - /* - autorepeat; - */ - - /* - joypad driver is poll-device driver. - poll-device is does not support wakeup-source. - */ - sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-UP"; - linux,code = ; // 0x220 - }; - sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-DOWN"; - linux,code = ; // 0x221 - }; - sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-LEFT"; - linux,code = ; // 0x222 - }; - sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO DPAD-RIGHT"; - linux,code = ; // 0x223 - }; - sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO KEY BTN-A"; - linux,code = ; // 0x131 - }; - sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-B"; - linux,code = ; // 0x130 - }; - sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-Y"; - linux,code = ; // 0x134 - }; - sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO BTN-X"; - linux,code = ; // 0x133 - }; - sw11 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBL"; - linux,code = ; // 0x2c2 - }; - sw12 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_THUMBR"; - linux,code = ; // 0x2c3 - }; - - sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_FN"; - linux,code = ; // 0x2c4 - }; - - sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT"; - linux,code = ; // 0x02 - }; - sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT"; - linux,code = ; // 0x05 - }; - sw19 { - gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_SELECT"; - linux,code = ; - }; - sw20 { - gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-RIGHT2"; - linux,code = ; - }; - sw21 { - gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; - label = "GPIO TOP-LEFT2"; - linux,code = ; - }; - sw22 { - gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; - label = "GPIO BTN_START"; - linux,code = ; - }; - }; - - battery: battery { - compatible = "simple-battery"; - charge-full-design-microamp-hours = <3500000>; - charge-term-current-microamp = <350000>; - constant-charge-current-max-microamp = <2000000>; - constant-charge-voltage-max-microvolt = <4200000>; - factory-internal-resistance-micro-ohms = <180000>; - voltage-max-design-microvolt = <4100000>; - voltage-min-design-microvolt = <3500000>; - - ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, - <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, - <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, - <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, - <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, - <3574170 0>; - }; -}; - -/* conflicts with pwm vibration motor */ -/delete-node/ &vcc_host; - -/* Device only has 1 LED compared to Odroid Go Advance */ -/delete-node/ &gpio_led; - -&internal_display { -// compatible = "anbernic,rg351v-panel", "newvision,nv3051d"; - // compatible = "powkiddy,rk2023-panel", "newvision,nv3051d"; - compatible = "archr,generic-dsi"; - iovcc-supply = <&vcc_lcd>; - vdd-supply = <&vcc_lcd>; - panel_description = - "G size=52,70 delays=2,1,20,120,20 format=rgb888 lanes=4 flags=0xe03", - - "M clock=26400 horizontal=640,119,2,119 vertical=480,13,2,5 default=1", - "M clock=27300 horizontal=640,207,24,207 vertical=480,13,9,5", - "M clock=26400 horizontal=640,207,2,207 vertical=480,13,2,5", - "M clock=27140 horizontal=640,119,45,119 vertical=480,13,90,5", - "M clock=26450 horizontal=640,119,42,119 vertical=480,13,2,5", - "M clock=28520 horizontal=640,119,3,119 vertical=480,13,44,5", - "M clock=31440 horizontal=640,119,39,119 vertical=480,13,74,5", - "M clock=26440 horizontal=640,31,30,31 vertical=480,13,103,5", - "M clock=31970 horizontal=640,31,36,31 vertical=480,13,76,5", - // "M clock=31680 horizontal=640,31,2,31 vertical=480,13,2,5", - "M clock=42240 horizontal=640,31,2,31 vertical=480,13,2,5", - - "I seq=ff30", "I seq=ff52", "I seq=ff01", - "I seq=e300", - "I seq=400a", - "I seq=0340", "I seq=0400", "I seq=0503", - "I seq=2412", "I seq=251e", "I seq=2628", "I seq=2752", - "I seq=2857", "I seq=2901", "I seq=2adf", - "I seq=389c", "I seq=39a7", "I seq=3a53", - "I seq=4400", - "I seq=493c", - "I seq=59fe", "I seq=5c00", - "I seq=9177", "I seq=9277", - "I seq=a055", "I seq=a150", "I seq=a49c", "I seq=a702", - "I seq=a801", "I seq=a901", "I seq=aafc", "I seq=ab28", "I seq=ac06", "I seq=ad06", "I seq=ae06", "I seq=af03", - "I seq=b008", "I seq=b126", "I seq=b228", "I seq=b328", "I seq=b433", "I seq=b508", "I seq=b626", "I seq=b708", - "I seq=b826", - "I seq=ff30", "I seq=ff52", "I seq=ff02", - "I seq=b00b", "I seq=b116", "I seq=b217", "I seq=b32c", "I seq=b432", "I seq=b53b", "I seq=b629", "I seq=b740", - "I seq=b80d", "I seq=b905", "I seq=ba12", "I seq=bb10", "I seq=bc12", "I seq=bd15", "I seq=be19", "I seq=bf0e", - "I seq=c016", "I seq=c10a", - "I seq=d00c", "I seq=d117", "I seq=d214", "I seq=d32e", "I seq=d432", "I seq=d53c", "I seq=d622", "I seq=d73d", - "I seq=d80d", "I seq=d907", "I seq=da13", "I seq=db13", "I seq=dc11", "I seq=dd15", "I seq=de19", "I seq=df10", - "I seq=e017", "I seq=e10a", - "I seq=ff30", "I seq=ff52", "I seq=ff03", - "I seq=002a", "I seq=012a", "I seq=022a", "I seq=032a", "I seq=0461", "I seq=0580", "I seq=06c7", "I seq=0701", - "I seq=0882", "I seq=0983", - "I seq=302a", "I seq=312a", "I seq=322a", "I seq=332a", "I seq=3461", "I seq=35c5", "I seq=3680", "I seq=3723", - "I seq=4082", "I seq=4183", "I seq=4280", "I seq=4381", "I seq=4411", "I seq=45e6", "I seq=46e5", "I seq=4711", - "I seq=48e8", "I seq=49e7", - "I seq=5002", "I seq=5101", "I seq=5204", "I seq=5303", "I seq=5411", "I seq=55ea", "I seq=56e9", "I seq=5711", - "I seq=58ec", "I seq=59eb", - "I seq=7e02", "I seq=7f80", - "I seq=e05a", - "I seq=b100", "I seq=b40e", "I seq=b50f", "I seq=b604", "I seq=b707", - "I seq=b806", "I seq=b905", "I seq=ba0f", - "I seq=c700", - "I seq=ca0e", "I seq=cb0f", "I seq=cc04", "I seq=cd07", "I seq=ce06", "I seq=cf05", - "I seq=d00f", - "I seq=810f", "I seq=840e", "I seq=850f", "I seq=8607", "I seq=8704", - "I seq=8805", "I seq=8906", "I seq=8a00", - "I seq=970f", - "I seq=9a0e", "I seq=9b0f", "I seq=9c07", "I seq=9d04", "I seq=9e05", "I seq=9f06", - "I seq=a000", - "I seq=ff30", "I seq=ff52", "I seq=ff02", - "I seq=0101", "I seq=02da", "I seq=03ba", "I seq=04a8", "I seq=059a", "I seq=0670", "I seq=07ff", - "I seq=0891", "I seq=0990", "I seq=0aff", "I seq=0b8f", "I seq=0c60", "I seq=0d58", "I seq=0e48", "I seq=0f38", - "I seq=102b", - "I seq=ff30", "I seq=ff52", "I seq=ff00", - "I seq=3602", - "I seq=3a70", - "I seq=11 wait=200", - "I seq=29 wait=10"; -}; - -&io_domains { - vccio1-supply = <&vccio_sd>; -}; - -/delete-node/ &pwm_led; - -&pwm0 { - status = "okay"; -}; - -/delete-node/ &pwm3; - -&rk817_charger { - /* This device does not have a current sense resistor */ - rockchip,resistor-sense-micro-ohms = <0>; - monitored-battery = <&battery>; -}; - -&sdio { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&vcc_sd { - regulator-max-microvolt = <3000000>; - regulator-min-microvolt = <1800000>; -}; - -&vccio_sd { - regulator-max-microvolt = <1800000>; -}; - -&pinctrl { - btns { - btn_pins_vol: btn-pins-vol { - rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - btn_pins: btn-pins { - rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; diff --git a/config/archr-dts/soysauce/Y3506_V03_20241104/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V03_20241104/rg351p-uboot.dtb deleted file mode 100644 index 5603c698d0..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20241104/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V03_20241104/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V03_20241104/rg351v-uboot.dtb deleted file mode 100644 index 5603c698d0..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20241104/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V03_20241104/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V03_20241104/rk3326-r36s-linux.dtb deleted file mode 100644 index 021b7393e3..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20241104/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V03_20250317/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V03_20250317/rg351p-uboot.dtb deleted file mode 100644 index d1daaa87f5..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20250317/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V03_20250317/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V03_20250317/rg351v-uboot.dtb deleted file mode 100644 index d1daaa87f5..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20250317/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V03_20250317/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V03_20250317/rk3326-r36s-linux.dtb deleted file mode 100644 index e10696a1a3..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V03_20250317/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2528/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2528/rk3326-r36s-linux.dtb deleted file mode 100644 index 0d1ea0da7f..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2528/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351p-uboot.dtb deleted file mode 100644 index 7754976b6f..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351v-uboot.dtb deleted file mode 100644 index 7754976b6f..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rk3326-r36s-linux.dtb deleted file mode 100644 index 85b2037304..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 6/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351p-kernel.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351p-kernel.dtb deleted file mode 100644 index 98b1dbfe3c..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351p-kernel.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351v-kernel.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351v-kernel.dtb deleted file mode 100644 index 98b1dbfe3c..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rg351v-kernel.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rk3326-r36s-linux.dtb deleted file mode 100644 index 37c26cccc3..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 253x Panel 7/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351p-uboot.dtb deleted file mode 100644 index 7754976b6f..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351v-uboot.dtb deleted file mode 100644 index 7754976b6f..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rk3326-r36s-linux.dtb deleted file mode 100644 index 3934e618be..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548 Panel 2/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351p-uboot.dtb deleted file mode 100644 index d1daaa87f5..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351v-uboot.dtb deleted file mode 100644 index d1daaa87f5..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rk3326-r36s-linux.dtb deleted file mode 100644 index 6dfc274859..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V04_20250529 2548/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351p-uboot.dtb deleted file mode 100644 index 2f233904bb..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351v-uboot.dtb deleted file mode 100644 index 2f233904bb..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rk3326-r36s-linux.dtb deleted file mode 100644 index 67ad12ee26..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2551/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351p-uboot.dtb deleted file mode 100644 index b4ee6f163a..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351v-uboot.dtb deleted file mode 100644 index b4ee6f163a..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rk3326-r36s-linux.dtb deleted file mode 100644 index b115fd2875..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_V05_20251215 2601/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351p-uboot.dtb deleted file mode 100644 index 5603c698d0..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351v-uboot.dtb deleted file mode 100644 index 5603c698d0..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rk3326-r36s-linux.dtb deleted file mode 100644 index 87df449997..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2507/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351p-uboot.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351p-uboot.dtb deleted file mode 100644 index 2f233904bb..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351p-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351v-uboot.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351v-uboot.dtb deleted file mode 100644 index 2f233904bb..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rg351v-uboot.dtb and /dev/null differ diff --git a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rk3326-r36s-linux.dtb b/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rk3326-r36s-linux.dtb deleted file mode 100644 index 0bd85da8ac..0000000000 Binary files a/config/archr-dts/soysauce/Y3506_v03_20241210 2533/rk3326-r36s-linux.dtb and /dev/null differ diff --git a/config/mipi-generator/archr-dtbo.py b/config/mipi-generator/archr-dtbo.py deleted file mode 100644 index e4f48a435d..0000000000 --- a/config/mipi-generator/archr-dtbo.py +++ /dev/null @@ -1,942 +0,0 @@ -#!/usr/bin/env python - -# https://pypi.org/project/fdt/ -# pip install fdt - -import os, sys -import fdt -import math - - - -def prop_default(panel, prop, default): - try: - return panel.get_property(prop).value - except: - return default - -def absfrac(x): - return abs(x - round(x)) - -def panel_to_desc(panel, args): - if 'name' in args: - g_name = args['name'] + ' ' - else: - g_name = '' - comment = args.get('comment') - acc = [] - - delays = [ - prop_default(panel, "prepare-delay-ms", 50), - prop_default(panel, "reset-delay-ms", 50), - prop_default(panel, "init-delay-ms", 50), - prop_default(panel, "enable-delay-ms", 50), - 20 # ready -- no such timeout in legacy dtbs - ] - delays_str = ','.join(map(str, delays)) - - fmtprop = panel.get_property("dsi,format") - if fmtprop: - fmt = ['rgb888', 'rgb666', 'rgb666_packed', 'rgb565'] [fmtprop.value] - else: - fmt = 'rgb888' - lanes = panel.get_property("dsi,lanes").value - flags = panel.get_property("dsi,flags").value - flags |= 0x0400 - - - timings = panel.get_subnode("display-timings") - if 'Dno' in args['flags']: - # Skip original mode (it may be broken) - native = None - else: - native = timings.get_property("native-mode").value - - # Collect vendor modes - modes = {} - orig_def_fps = None - for m in timings.nodes: - clock = round(m.get_property("clock-frequency").value/1000) - hor = [ - m.get_property("hactive").value, - m.get_property("hfront-porch").value, - m.get_property("hsync-len").value, - m.get_property("hback-porch").value, - ] - ver = [ - m.get_property("vactive").value, - m.get_property("vfront-porch").value, - m.get_property("vsync-len").value, - m.get_property("vback-porch").value, - ] - - mode = {'clock': clock, 'hor': hor, 'ver': ver} - # Some vendor DTBs (e.g. R36S-V20 2025-05-18) omit `phandle` on - # individual modes. A mode without a phandle can't be the native - # default, so skip the comparison instead of crashing. - phandle_prop = m.get_property("phandle") - is_native = phandle_prop is not None and phandle_prop.value == native - if is_native: - mode['default'] = True - - htotal = sum(hor) - vtotal = sum(ver) - fps = clock*1000/(htotal*vtotal) - - if fps not in modes: - modes[fps] = mode - if is_native: - modes[fps]['default'] = True - orig_def_fps = fps - - - try: - w = panel.get_property("width-mm").value - h = panel.get_property("height-mm").value - except: - if args.diagonal: - diag_mm = args.diagonal * 25.4 - else: - diag_mm = 3.5 * 2.54 - - randmode = list(modes.values())[0] - hactive = randmode['hor'][0] - vactive = randmode['ver'][0] - pxdiag = math.sqrt(hactive*hactive + vactive*vactive) - w = round(diag_mm * hactive/pxdiag) - h = round(diag_mm * vactive/pxdiag) - - # G size=52,70 delays=2,1,20,120,50,20 format=rgb888 lanes=4 flags=0xe03 - acc += [f"G {g_name}size={w},{h} delays={delays_str} format={fmt} lanes={lanes} flags=0x{flags:x}", ""] - - # Based on vendor modes construct a better set of modes - # https://tasvideos.org/PlatformFramerates - # 50, 60 -- generic - # */1.001 -- NTSC hack with 1001 divisor - # 50.0070 -- PAL NES https://www.nesdev.org/wiki/Cycle_reference_chart - # 60.0988 -- NTSC NES - # 54.8766 -- src/mame/toaplan/twincobr.cpp - # 57.5 -- src/mame/kaneko/snowbros.cpp - # 59.7275 -- https://en.wikipedia.org/wiki/Game_Boy - # 75.47 -- https://ws.nesdev.org/wiki/Display - def_fps = 60 - if orig_def_fps: - def_fps = orig_def_fps - common_fpss = [50/1.001, 50, 50.0070, 57.5, 59.7275, 60/1.001, 60, 60.0988, 75.47, 90, 120]; - common_fpss = [ fps for fps in common_fpss if fps != orig_def_fps] - for targetfps in [orig_def_fps] + common_fpss: - if not targetfps: - continue - warn = "" - # nearest fps to base on - greaterfps = [fps for fps in modes.keys() if fps >= targetfps] - if greaterfps == []: - basefps = max(modes.keys()) - basemode = modes[basefps] - clock = None - else: - # Trust original clock. If real clock differs, maybe make a whitelist or blacklist here - basefps = min(greaterfps) - basemode = modes[basefps] - clock = basemode['clock'] - hor = basemode['hor'].copy() - ver = basemode['ver'].copy() - # Assume original totals are minimal for the panel at this clock - htotal = sum(hor) - vtotal = sum(ver) - perfectclock = targetfps*htotal*vtotal/1000 - if not clock: - warn = "(CAN FAIL) " - # This may fail, but worth trying. Round up to 10kHz - clock = math.ceil(perfectclock/10)*10 - elif clock > 1.25*perfectclock: - # Too much deviation may cause no image - clock = math.ceil(perfectclock/10)*10 - - maxvtotal = round(vtotal*1.25) - # A little bruteforce to find a best totals for target fps - # TODO: maybe iterate over some clock values too - options = [(absfrac(c*1000/targetfps/vt), c, vt) - for vt in range(vtotal, maxvtotal+1) - for c in range(clock, round(1.25*perfectclock), 10) - if ((c*1000/targetfps/vt) >= htotal) and ((c*1000/targetfps/vt) < htotal*1.05) ] - if options == []: - acc += [f"# failed to find mode for fps={targetfps:.6f} c={clock} h={htotal} v={vtotal}"] - continue - (mindev, newclock, newvtotal) = min(options) - # construct a new mode with chosen vtotal - newhtotal = round(newclock*1000/targetfps/newvtotal) - addhtotal = newhtotal - htotal - addvtotal = newvtotal - vtotal - expectedfps = newclock*1000/newvtotal/newhtotal - hor[2] += addhtotal - ver[2] += addvtotal - hor_str = ','.join(map(str, hor)) - ver_str = ','.join(map(str, ver)) - maybe_default = " default=1" if targetfps == def_fps else "" - maybe_comment = f" # {warn}fps={expectedfps:.6f} (target={targetfps:.6f})" if comment else "" - acc += [f"M clock={newclock} horizontal={hor_str} vertical={ver_str}{maybe_default}{maybe_comment}"] - - acc += [""] - - iseq0 = panel.get_property("panel-init-sequence") - if (hasattr(iseq0, 'value')) and (isinstance(iseq0.value, (int))): - iseq = b''.join(map(lambda w : w.to_bytes(4, "big"), list(iseq0))) - else: - iseq = bytearray(iseq0) - - while iseq: - cmd = iseq[0] - wait = iseq[1] - datalen = iseq[2] - iseq = iseq[3:] - - data = iseq[0:datalen] - iseq = iseq[datalen:] - - maybe_wait = f" wait={wait}" if (wait) else "" - maybe_comment = f" # orig_cmd=0x{cmd:x}" if comment else "" - acc += [f"I seq={data.hex()}{maybe_wait}{maybe_comment}"] - - return acc - -def node_by_phandle(dt, phandle): - nodes = [p.parent - for p in dt.search('phandle', fdt.ItemType.PROP_WORDS) - if p.value == phandle] - return nodes[0] - -def resolve_phandle(dt, phandle): - p = node_by_phandle(dt, phandle) - return os.path.join(p.path, p.name) - -def add_overlay(overlay, path): - for f in range(100): - nodename = 'fragment@' + str(f) - if overlay.exist_node(nodename): - pass - else: - fragnode = fdt.Node(nodename) - if path[0] == '&': - fragnode.set_property('target', 0xffffffff) - overlay.set_property(path[1:], '/'+nodename+':target:0', path='/__fixups__') - else: - fragnode.set_property('target-path', path) - overlay.add_item(fragnode) - ovlnode = fdt.Node('__overlay__') - fragnode.append(ovlnode) - return ovlnode - -def add_fixup(overlay, label, fixup_path): - if overlay.exist_node('__fixups__'): - fixups = overlay.get_node('__fixups__') - else: - fixups = fdt.Node('__fixups__') - overlay.add_item(fixups) - prev_paths = fixups.get_property(label) - if prev_paths: - fixups.set_property(label, prev_paths.data + [fixup_path]) - else: - fixups.set_property(label, [fixup_path]) - -def add_local_fixup(overlay, parent_path, name): - overlay.set_property(name, 0, path='__local_fixups__'+parent_path) - -def add_gpio_vol_keys(dt, overlay, gpio_keys_ovl): - symbols = dt.get_node('__symbols__') - - keydata = dt.get_node('/play_joystick').get_property('key-gpios').data - pindata = dt.get_node('/pinctrl/buttons/gpio-key-pin').get_property('rockchip,pins').data - # extract volume keys from array - vol_up = keydata[14*3:15*3] - vol_up_pin = pindata[14*4:15*4] - vol_dn = keydata[15*3:16*3] - vol_dn_pin = pindata[15*4:16*4] - - gpio_path = resolve_phandle(dt, vol_up[0]) - gpio_sym = [p.name for p in symbols.props if p.value == gpio_path][0] - gpio_phandle = 0xffffffff - - pins_path = gpio_keys_ovl.path+'/__overlay__/pinctrl/btns/btn-pins-vol-overlay' - keys_path = gpio_keys_ovl.path+'/__overlay__/gpio-keys-overlay' - - pullup = 0xffffffff - overlay.set_property('rockchip,pins', vol_up_pin[0:3] + [pullup] + vol_dn_pin[0:3] + [pullup], path=pins_path) - pins_phandle = overlay.add_label('overlay_btns') - overlay.set_property('phandle', pins_phandle, path=pins_path) - add_fixup(overlay, 'pcfg_pull_up', pins_path+':rockchip,pins:12') - add_fixup(overlay, 'pcfg_pull_up', pins_path+':rockchip,pins:28') - - overlay.set_property('compatible', 'gpio-keys', path=keys_path) - overlay.set_property('autorepeat', None, path=keys_path) - overlay.set_property('pinctrl-0', pins_phandle, path=keys_path) - add_local_fixup(overlay, keys_path, 'pinctrl-0') - overlay.set_property('pinctrl-names', 'default', path=keys_path) - - overlay.set_property('gpios', [gpio_phandle, vol_up[1], vol_up[2]], path=keys_path+'/button-vol-up') - overlay.set_property('label', "VOLUMEUP", path=keys_path+'/button-vol-up') - overlay.set_property('linux,code', 0x73, path=keys_path+'/button-vol-up') - add_fixup(overlay, gpio_sym, keys_path+'/button-vol-up:gpios:0') - - overlay.set_property('gpios', [gpio_phandle, vol_dn[1], vol_dn[2]], path=keys_path+'/button-vol-down') - overlay.set_property('label', "VOLUMEDOWN", path=keys_path+'/button-vol-down') - overlay.set_property('linux,code', 0x72, path=keys_path+'/button-vol-down') - add_fixup(overlay, gpio_sym, keys_path+'/button-vol-down:gpios:0') - - -def switch_joypad_to_mymini(overlay, jp_ovl): - # My mini has separate ADC channels for axis, so we need another driver - jp_ovl.set_property('compatible', "archr-joypad") - jp_ovl.set_property('io-channel-names', ["key-RY", "key-RX", "key-LY", "key-LX"]) - jp_ovl.set_property('io-channels', [0xffffffff, 3, 0xffffffff, 3, 0xffffffff, 2, 0xffffffff, 1]) - add_fixup(overlay, 'saradc', jp_ovl.path+'/__overlay__:io-channels:0') - add_fixup(overlay, 'saradc', jp_ovl.path+'/__overlay__:io-channels:8') - add_fixup(overlay, 'saradc', jp_ovl.path+'/__overlay__:io-channels:16') - add_fixup(overlay, 'saradc', jp_ovl.path+'/__overlay__:io-channels:24') - jp_ovl.set_property('button-adc-scale', 2) - jp_ovl.set_property('button-adc-deadzone', 216) - jp_ovl.set_property('button-adc-fuzz', 54) - jp_ovl.set_property('button-adc-flat', 54) - jp_ovl.set_property('abs_x-p-tuning', 180) - jp_ovl.set_property('abs_x-n-tuning', 180) - jp_ovl.set_property('abs_y-p-tuning', 180) - jp_ovl.set_property('abs_y-n-tuning', 180) - jp_ovl.set_property('abs_rx-p-tuning', 0) - jp_ovl.set_property('abs_rx-n-tuning', 0) - jp_ovl.set_property('abs_ry-p-tuning', 0) - jp_ovl.set_property('abs_ry-n-tuning', 0) - jp_ovl.set_property('poll-interval', 10) - - -def copy_gpio_prop(dt, symbols, overlay, src_node, prop_name, ovl_target_path): - """Propagate a *-gpios property from `src_node` (vendor DTB) into the - overlay at `ovl_target_path`, attaching the correct __fixup__ so the - bootloader resolves the phandle against the live base DTB. - - Returns True on success, False if the property is absent or the - referenced controller cannot be resolved. Logs nothing — caller can - decide whether to warn. - """ - if not src_node.exist_property(prop_name): - return False - try: - data = src_node.get_property(prop_name).data - except Exception: - return False - if not data or len(data) < 3: - return False - try: - gpio_path = resolve_phandle(dt, data[0]) - gpio_sym = next(p.name for p in symbols.props if p.value == gpio_path) - except (StopIteration, Exception): - return False - overlay.set_property(prop_name, [0xffffffff, data[1], data[2]], - path=ovl_target_path) - add_fixup(overlay, gpio_sym, ovl_target_path + ':' + prop_name + ':0') - return True - - -def extract_joypad_wiring(dt, overlay, jp_ovl, args, symbols): - """Propagate vendor-specific joypad wiring to the overlay: - * amux-a-gpios, amux-b-gpios, amux-en-gpios (root joypad node) - * gpios on each swN child (per-button) - * button-adc-{deadzone,fuzz,flat} when vendor differs from defaults - - These vary per board family: clone uses pins 16/15/11, original - uses 11/8/13, soysauce uses 13/12/17. The button GPIOs vary even - more (different banks). Without this propagation the merged DTB - keeps our base's "original" wiring and clone/soysauce hardware - boots with all buttons mapped to wrong pins. - """ - try: - jp = dt.get_node('/odroidgo3-joypad') - except Exception: - return - - ovl_root = jp_ovl.path + '/__overlay__' - - # amux selectors - for prop in ('amux-a-gpios', 'amux-b-gpios', 'amux-en-gpios'): - if copy_gpio_prop(dt, symbols, overlay, jp, prop, ovl_root): - data = jp.get_property(prop).data - args['logger'].info(f"{prop} pin={data[1]} flags={data[2]} on {ovl_root}") - - # per-button gpios (sw1..sw22 etc.) - button_count = 0 - for sw_node in jp.nodes: - name = sw_node.name - if not name.startswith('sw'): - continue - target = ovl_root + '/' + name - if copy_gpio_prop(dt, symbols, overlay, sw_node, 'gpios', target): - button_count += 1 - if button_count: - args['logger'].info(f"propagated {button_count} per-button gpios on {ovl_root}") - - # button-adc tunings — only emit override if vendor differs from - # the default our base ships. Saves overlay size for the common case. - BUTTON_ADC_DEFAULTS = { - 'button-adc-deadzone': 96, - 'button-adc-fuzz': 48, - 'button-adc-flat': 48, - } - for prop, default in BUTTON_ADC_DEFAULTS.items(): - if not jp.exist_property(prop): - continue - val = jp.get_property(prop).value - if val != default: - overlay.set_property(prop, val, path=ovl_root) - args['logger'].info(f"{prop}={val} (vendor differs from default {default})") - - # rumble-gpio: some clone boards (R36S V20 2025-05-18 batch, GR36) - # expose a dedicated GPIO that gates the rumble motor — without - # propagating it the motor sits in its default state, which on - # those boards is "on" (= constant vibration). The audit across - # 44 vendor DTBs flagged this in Tier 3; we handle it explicitly - # here so the overlay carries the right pin and the bootloader - # phandle fixup resolves against our GPIO controller. - if copy_gpio_prop(dt, symbols, overlay, jp, 'rumble-gpio', ovl_root): - data = jp.get_property('rumble-gpio').data - args['logger'].info(f"rumble-gpio pin={data[1]} flags={data[2]} on {ovl_root}") - - -# ---------- Tier 3: auto-discovery of custom vendor properties -------------- -# -# Some vendor BSPs ship board-specific properties we never planned for -# (rumble-direction-fix, special-button-quirk, custom-trigger-mode, ...). -# The "extract every known prop" approach leaves those on the cutting -# room floor. Tier 3 walks the vendor tree, identifies anything we don't -# already handle, and propagates it to the overlay — with logging so -# the user knows exactly which non-standard props came along. - -# Props we ALREADY handle via dedicated extraction logic above; don't -# touch them in the auto-discovery pass. -_KNOWN_PANEL_PROPS = frozenset({ - 'compatible', 'reg', 'phandle', 'linux,phandle', 'status', - 'panel_description', 'panel-init-sequence', 'panel-exit-sequence', - 'display-timings', 'rotation', - 'dsi,format', 'dsi,lanes', 'dsi,flags', 'dsi,burst-mode', 'dsi,sync-mode', - 'prepare-delay-ms', 'reset-delay-ms', 'init-delay-ms', - 'enable-delay-ms', 'disable-delay-ms', 'unprepare-delay-ms', - 'width-mm', 'height-mm', 'bus-format', 'bpc', - 'reset-gpios', 'enable-gpios', - 'led-red-gpios', 'led-green-gpios', - 'led-blue1-gpios', 'led-blue2-gpios', - 'iovcc-supply', 'vdd-supply', 'vsp-supply', 'vsn-supply', - 'vcc-supply', 'power-supply', 'backlight', 'backlight-supply', -}) - -_KNOWN_JOYPAD_PROPS = frozenset({ - 'compatible', 'reg', 'phandle', 'linux,phandle', 'status', - 'pinctrl-names', 'pinctrl-0', 'pinctrl-1', - 'io-channel-names', 'io-channels', - 'amux-count', 'amux-channel-mapping', - 'amux-a-gpios', 'amux-b-gpios', 'amux-en-gpios', - 'button-adc-deadzone', 'button-adc-fuzz', 'button-adc-flat', - 'button-adc-scale', 'button-adc-tuned-scale', - 'abs_x-p-tuning', 'abs_x-n-tuning', 'abs_y-p-tuning', 'abs_y-n-tuning', - 'abs_rx-p-tuning', 'abs_rx-n-tuning', 'abs_ry-p-tuning', 'abs_ry-n-tuning', - 'abs-x-p-tuned-val', 'abs-x-n-tuned-val', - 'abs-y-p-tuned-val', 'abs-y-n-tuned-val', - 'abs-rx-p-tuned-val', 'abs-rx-n-tuned-val', - 'abs-ry-p-tuned-val', 'abs-ry-n-tuned-val', - 'abs-left-first', 'poll-interval', - 'invert-absx', 'invert-absy', 'invert-absrx', 'invert-absry', - 'swap-absxy', 'swap-absrxy', 'vendor-direction', - 'rumble-boost-weak', 'rumble-boost-strong', - 'rumble-gpio', - 'pwms', 'pwm-names', - 'key-gpios', -}) - -_KNOWN_SW_PROPS = frozenset({ - 'gpios', 'phandle', 'linux,phandle', - 'amux-channel', -}) - -# Props that must NEVER be propagated from vendor, even if discovered. -# Either userspace expects our specific value (joypad-name, linux,code) -# or our base intentionally diverges (regulator ranges for OC). -_BLACKLIST = frozenset({ - 'joypad-name', 'joypad-product', 'joypad-revision', - 'linux,code', 'label', - 'regulator-min-microvolt', 'regulator-max-microvolt', - 'regulator-ramp-delay', 'regulator-initial-mode', - 'regulator-always-on', 'regulator-boot-on', -}) - - -def _prop_is_phandle_array(prop): - """Heuristic: PropWords with values that look like phandles (small - positive integers, multiple entries). Without knowing the exact - layout (#xxx-cells) we can't remap; skip these and let the user - add manual support if needed.""" - if not isinstance(prop, fdt.PropWords): - return False - # Common phandle arrays have 2-4 cells per entry; single-cell - # numerics (delays, sizes) are safe to copy. - if len(prop.data) <= 1: - return False - # If every value is small (< 0x1000), it's likely a numeric tuning - # array; if any is "large" (>= 0x10), it's likely a phandle. Soft - # rule but works for the props we've seen in the wild. - return any(v >= 0x10 for v in prop.data) - - -def _set_prop_on_overlay(overlay, prop, ovl_target_path): - """Copy a Property to the overlay tree at the given path. Handles - the three concrete subclasses of fdt.Property we care about.""" - if isinstance(prop, fdt.PropStrings): - overlay.set_property(prop.name, prop.data, path=ovl_target_path) - elif isinstance(prop, fdt.PropWords): - overlay.set_property(prop.name, prop.data, path=ovl_target_path) - elif isinstance(prop, fdt.PropBytes): - overlay.set_property(prop.name, bytes(prop.data), path=ovl_target_path) - elif hasattr(prop, 'value') and prop.value is None: - # Boolean-style empty property - overlay.set_property(prop.name, True, path=ovl_target_path) - else: - # Unknown type — skip rather than crash - return False - return True - - -def auto_discover_custom(dt, overlay, panel_ovl, jp_ovl, args): - """Walk panel + joypad + sw* subnodes in the vendor DTB. Any prop - not in our known/handled set and not blacklisted gets propagated - to the overlay. Phandle arrays are skipped (would need remap that - we don't have layout info for). Logs each discovery.""" - discoveries = [] - - def _visit(node, known_set, ovl_target_path, scope_label): - for p in node.props: - if p.name in known_set or p.name in _BLACKLIST: - continue - if _prop_is_phandle_array(p): - args['logger'].info( - f"auto-discovery: skip {scope_label}/{p.name} " - f"(phandle array, layout unknown)") - continue - if _set_prop_on_overlay(overlay, p, ovl_target_path): - val = p.value if hasattr(p, 'value') else '' - discoveries.append((scope_label, p.name, val)) - - # Panel - try: - panel = dt.get_node('/dsi@ff450000/panel@0') - panel_ovl_path = panel_ovl.path + '/__overlay__/dsi@ff450000/panel@0' - _visit(panel, _KNOWN_PANEL_PROPS, panel_ovl_path, 'panel') - except Exception: - pass - - # Joypad root - try: - jp = dt.get_node('/odroidgo3-joypad') - jp_ovl_path = jp_ovl.path + '/__overlay__' - _visit(jp, _KNOWN_JOYPAD_PROPS, jp_ovl_path, 'joypad') - # And each sw* subnode - for sw in jp.nodes: - if not sw.name.startswith('sw'): - continue - _visit(sw, _KNOWN_SW_PROPS, jp_ovl_path + '/' + sw.name, - f'joypad/{sw.name}') - except Exception: - pass - - if discoveries: - args['logger'].info( - f"auto-discovery: propagated {len(discoveries)} custom vendor props") - for scope, name, val in discoveries: - args['logger'].info(f" custom: {scope}/{name} = {val!r}") - return discoveries - - -def make_dtbo(dtb_data, args): - dt = fdt.parse_dtb(dtb_data) - symbols = dt.get_node('__symbols__') - - dsipath = symbols.get_property('dsi').value - # panelpath is /dsi@ff450000/panel@0 on rk3326 and /dsi@fe060000/panel@0 on rk3566 - panelpath = dsipath + '/panel@0' - panel = dt.get_node(panelpath) - pdesc = panel_to_desc(panel, args) - - # remove empty lines as pyfdt does not like them - pdesc = [ l for l in pdesc if l != ''] - - panel_rst_gpio = panel.get_property('reset-gpios').data - gpio_sym = [p.name for p in symbols.props if p.value == resolve_phandle(dt, panel_rst_gpio[0])][0] - gpio_num = int(gpio_sym[4:]) - - # create an overlay tree - overlay = fdt.FDT() - overlay.header.version = 17 - - panel_ovl = add_overlay(overlay, '/') - panel_ovl_path = panel_ovl.path+'/__overlay__'+panelpath - overlay.set_property('compatible', 'archr,generic-dsi', path=panel_ovl_path) - overlay.set_property('panel_description', pdesc, path=panel_ovl_path) - if 'DR90' in args['flags']: - overlay.set_property('rotation', 90, path=panel_ovl_path) - elif 'DR180' in args['flags']: - overlay.set_property('rotation', 180, path=panel_ovl_path) - elif 'DR270' in args['flags']: - overlay.set_property('rotation', 270, path=panel_ovl_path) - - compat = dt.get_node('/').get_property('compatible').data[0] - args['logger'].info(f"compatible {compat}") - # Original-only short-circuit: the original kernel DTB (rk3326-odroid-go2) - # already has the correct reset-gpios, power-supply and backlight wiring, - # so the DTBO only needs panel description/timings/init-sequence. - # - # Gate by subdevice (passed as 'SDORIG' from generator.sh), NOT by vendor - # compatible alone: several clone vendor DTBs (e.g. G80CA V1.2 04-22/04-23 - # Panel 8 and 9, G80C V1.1 Panel 9) ship with - # `compatible = "rockchip,rk3326-odroidgo3-linux"` despite being clone - # hardware. Trusting that string skipped the GPIO overrides on clones and - # produced the "backlight on, no image" black screen on those boards. - if 'SDORIG' in args['flags'] and 'odroidgo3' in compat: - # Short-circuit path: kernel base DTB already has the correct - # GPIO/panel wiring, no overlay edits needed beyond what we - # already produced. BUT: if the user passed NAm (no external - # amplifier), we still have to switch the active sound card - # from `rk817-sound` (amp routing) to `rk817-sound-spko-direct`, - # otherwise mainline ASoC keeps the speaker muted (Y3506 - # Soysauce V03/V04/V05 fall here). - if 'NAm' in args['flags']: - hpdet_ovl = add_overlay(overlay, '/') - spko_path = hpdet_ovl.path + '/__overlay__/rk817-sound-spko-direct' - default_path = hpdet_ovl.path + '/__overlay__/rk817-sound' - overlay.set_property('status', 'okay', path=spko_path) - overlay.set_property('status', 'disabled', path=default_path) - args['logger'].info("audio: spko-direct variant via short-circuit (odroidgo3 + NAm)") - return overlay.to_dtb() - - # copy reset config - pins_path = panel_ovl.path+'/__overlay__/pinctrl/gpio-lcd/lcd-rst' - overlay.set_property('reset-gpios', [0xffffffff, panel_rst_gpio[1], panel_rst_gpio[2]], path=panel_ovl_path) - add_fixup(overlay, gpio_sym, panel_ovl_path+':reset-gpios:0') - overlay.set_property('rockchip,pins', [gpio_num, panel_rst_gpio[1], 0, 0xffffffff], path=pins_path) - add_fixup(overlay, 'pcfg_pull_none', pins_path+':rockchip,pins:12') - # power supply gpio fetch (some trees do not have power-supply prop) - try: - panel_ps = dt.get_node(resolve_phandle(dt, panel.get_property('power-supply').value)) - panel_ps_gpio = panel_ps.get_property('gpio').data - gpio_sym = [p.name for p in symbols.props if p.value == resolve_phandle(dt, panel_ps_gpio[0])][0] - gpio_num = int(gpio_sym[4:]) - # power supply reg - panel_reg_path = panel_ovl.path+'/__overlay__/vcc18-lcd0' - overlay.set_property('gpio', [0xffffffff, panel_ps_gpio[1], panel_ps_gpio[2]], path=panel_reg_path) - add_fixup(overlay, gpio_sym, panel_reg_path+':gpio:0') - # power supply pinctrl - panel_ps_pin_path = panel_ovl.path+'/__overlay__/pinctrl/vcc18-lcd/vcc18-lcd-n' - overlay.set_property('rockchip,pins', [gpio_num, panel_ps_gpio[1], 0, 0xffffffff], path=panel_ps_pin_path) - add_fixup(overlay, 'pcfg_pull_none', panel_ps_pin_path+':rockchip,pins:12') - except: - pass - # some devices (e.g. R36s clone) have enable-gpios defined - try: - panel_en_gpio = panel.get_property('enable-gpios').data - gpio_sym = [p.name for p in symbols.props if p.value == resolve_phandle(dt, panel_en_gpio[0])][0] - overlay.set_property('enable-gpios', [0xffffffff, panel_en_gpio[1], panel_en_gpio[2]], path=panel_ovl_path) - add_fixup(overlay, gpio_sym, panel_ovl_path+':enable-gpios:0') - except: - pass - - # Soysauce Y3506 V04+/V05 boards have status LEDs on the panel - # itself (red + blue1/blue2/green) used for battery/charging - # indication. Tier 3 audit flagged these in 8 vendor DTBs. Without - # propagation the LED GPIOs default to the bootloader state — on - # most boards they end up "on", giving the user a permanent red - # light that doesn't react to charging state. Each is a standard - # triple, same layout as reset-gpios. - for led_prop in ('led-red-gpios', 'led-green-gpios', - 'led-blue1-gpios', 'led-blue2-gpios'): - if copy_gpio_prop(dt, symbols, overlay, panel, led_prop, panel_ovl_path): - data = panel.get_property(led_prop).data - args['logger'].info(f"panel {led_prop} pin={data[1]} flags={data[2]}") - - - # If the vendor DTB explicitly disables /adc-keys, mirror that decision - # in the overlay. We deliberately do NOT treat "/adc-keys absent" as - # MyMini hardware: most ArchR vendor DTBs are partial extractions that - # don't ship that node even when the underlying board has K36-style - # single-ADC sticks. Auto-detecting MyMini from absence broke input on - # every K36 R36S in our 43-board set. Default is K36 unless JPmm is - # explicitly requested or /adc-keys is present-but-disabled. - need_adckeys_disable = False - if dt.exist_node('/adc-keys'): - adckeys_orig = dt.get_node('/adc-keys') - adckeys_status = adckeys_orig.get_property('status') - if (adckeys_status) and (adckeys_status.value == 'disabled'): - need_adckeys_disable = True - if need_adckeys_disable: - noadck_ovl = add_overlay(overlay, '/') - overlay.set_property('dtbo_comment', 'deliberately-disabled-adc-keys', path=noadck_ovl.path+'/__overlay__/adc-keys') - overlay.set_property('status', 'disabled', path=noadck_ovl.path+'/__overlay__/adc-keys') - args['logger'].info(f"disabled adc-keys") - # TODO: extract GPIO keys from play_joystick.key-gpios[14..15] - if dt.exist_node('/play_joystick'): - add_gpio_vol_keys(dt, overlay, noadck_ovl) - else: - adck_ovl = add_overlay(overlay, '/') - overlay.set_property('status', 'okay', path=adck_ovl.path+'/__overlay__/adc-keys') - - - # joypad overlay always present to simplify different options - jp_ovl = add_overlay(overlay, '&joypad') - - # If not explicitly specified, disabled adc-keys imply multi-adc MyMini-style joypad - if 'JPk36' in args['flags']: - pass - elif ('JPmm' in args['flags']) or (need_adckeys_disable): - args['logger'].info(f"My Mini joypad tweaks on {jp_ovl.path}") - switch_joypad_to_mymini(overlay, jp_ovl) - - # Left stick was inverted by default, so invert inversion here - if ('LSi' not in args['flags']) ^ (need_adckeys_disable): - jp_ovl.set_property('invert-absx', 1) - jp_ovl.set_property('invert-absy', 1) - args['logger'].info(f"left stick un-inverted on {jp_ovl.path}") - else: - args['logger'].info(f"left stick left inverted") - - # If needed, invert right stick - if 'RSi' in args['flags']: - jp_ovl.set_property('invert-absrx', 1) - jp_ovl.set_property('invert-absry', 1) - args['logger'].info(f"invert right stick on {jp_ovl.path}") - - # Propagate the vendor's joypad hardware wiring (amux pins, per-button - # GPIOs, ADC tunings). Without this, clone and soysauce boards inherit - # the "original" base layout and end up with controls all over the - # place — see audit_all.py for the pin matrix across the 44 vendor - # DTBs we ship. - extract_joypad_wiring(dt, overlay, jp_ovl, args, symbols) - - - try: - snd = dt.get_node('/rk817-sound') - - # Vendor BSP DTBs use one of two names for the headphone - # detection GPIO. Legacy Rockchip BSP 4.4 boards write - # `hp-det-gpio`. Newer batches (including most Soysauce - # variants generated from mainline-style DT) use the - # canonical `simple-audio-card,hp-det-gpio`. Without - # accepting both we silently skipped the audio block on V05. - hpdet_prop = snd.get_property('hp-det-gpio') - if hpdet_prop is None: - hpdet_prop = snd.get_property('simple-audio-card,hp-det-gpio') - if hpdet_prop is None: - raise RuntimeError("no hp-det-gpio property on /rk817-sound") - hpdet = list(hpdet_prop.data) - # Some vendor DTBs omit /pinctrl/headphone/hp-det entirely - # because the kernel auto-binds via the codec phandle. We - # tolerate that: if the pinctrl node is missing we skip the - # bias-pull fixup; the codec still picks up the headphone - # detection gpio from simple-audio-card,hp-det-gpio. - try: - hp_det = dt.get_node('/pinctrl/headphone/hp-det') - hp_det_pins = list(hp_det.get_property('rockchip,pins').data) - hp_det_pull_node = node_by_phandle(dt, hp_det_pins[3]) - except Exception: - hp_det = None - hp_det_pins = None - hp_det_pull_node = None - # resolve <0x6f> into '/pinctrl/gpio2@ff260000' - hpdet_gpio_path = resolve_phandle(dt, hpdet[0]) - # find symbol 'gpio2' for path '/pinctrl/gpio2@ff260000' - gpiosyms = [p.name for p in symbols.props if p.value == hpdet_gpio_path] - if not gpiosyms: - raise RuntimeError(f"hp-det gpio controller phandle {hpdet[0]} not in __symbols__") - gpio_sym = gpiosyms[0] - - # on success, add overlay - hpdet_ovl = add_overlay(overlay, '/') - - force_simple_audio_routing = ('SRs' in args['flags']) - - # Detect amplifier GPIO. Direct `spk-con-gpio` on the sound node is - # the legacy path. Newer R36S clones (post-2025-03-18 batches) wire - # the amplifier through `rockchip,codec/spk-ctl-gpios` instead, so - # we follow the codec phandle as a fallback. - amp_gpio = None - if not force_simple_audio_routing: - if snd.exist_property('spk-con-gpio'): - amp_gpio = snd.get_property('spk-con-gpio').data - elif snd.exist_property('rockchip,codec'): - snd_codec_ph = snd.get_property('rockchip,codec').value - snd_codec_path = resolve_phandle(dt, snd_codec_ph) - snd_codec = dt.get_node(snd_codec_path) - if snd_codec.exist_property('spk-ctl-gpios'): - amp_gpio = snd_codec.get_property('spk-ctl-gpios').data - - # --------------------------------------------------------------- - # Pick one of three sound card variants exposed by the base DTS - # (defined in rk3326-gameconsole-r36s.dts): - # - # 1. `rk817-sound-amplified`: external speaker amp gated by a - # discrete enable GPIO (R36S original, K36, most clones). - # Selected when vendor DTB declares `spk-con-gpio` (or its - # codec-side equivalent `spk-ctl-gpios`). - # 2. `rk817-sound-simple`: external amp on a regulator without - # a GPIO gate. Selected via the SRs flag, since vendor DTBs - # cannot disambiguate this from "no amp at all". - # 3. `rk817-sound-spko-direct`: speaker driven straight from - # the rk817 SPKO output, with no external amp. Selected via - # the NAm (No Amplifier) flag. This is what Y3506 Soysauce - # V03/V04/V05 actually need. Vendor BSP kernel 4.4 hid this - # gap because `rk817_codec.c` carried hardcoded DAPM - # widgets; mainline ASoC respects the DT strictly, so - # without this variant the speaker stays muted no matter - # what the vendor card declares. - # - # Vendor DTBs cannot be reliably auto-classified because the - # R36S original BSP and the Y3506 BSP both publish identical - # rk817-sound nodes (just Mic + Headphone, no Speaker widget, - # no `spk-con-gpio`). The amp presence is a hardware fact, so - # generator.sh tags soysauce boards with NAm and original / - # clone boards default to amplified. - force_no_amp = ('NAm' in args['flags']) - - if force_no_amp: - rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-spko-direct' - args['logger'].info("audio: spko-direct variant (NAm flag: no external amp, SPKO direct to speaker)") - elif amp_gpio: - rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-amplified' - amp_gpio_sym = [p.name for p in symbols.props if p.value == resolve_phandle(dt, amp_gpio[0])][0] - gpio_num = int(amp_gpio_sym[4:]) - args['logger'].info(f"audio: amplified variant (spk-con-gpio {amp_gpio_sym} {amp_gpio[1]})") - - amp_path = hpdet_ovl.path+'/__overlay__/audio-amplifier' - overlay.set_property('enable-gpios', [0xffffffff, amp_gpio[1], amp_gpio[2]], path=amp_path) - add_fixup(overlay, amp_gpio_sym, amp_path+':enable-gpios:0') - - amp_pc_path = hpdet_ovl.path+'/__overlay__/pinctrl/speaker/spk-amp-enable-h' - overlay.set_property('rockchip,pins', [gpio_num, amp_gpio[1], 0, 0xffffffff], path=amp_pc_path) - add_fixup(overlay, 'pcfg_pull_none', amp_pc_path+':rockchip,pins:12') - elif force_simple_audio_routing: - rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-simple' - args['logger'].info("audio: simple variant (SRs flag: external amp on regulator)") - elif 'SDCLONE' in args['flags']: - # Clone subdevice (rk3326-gameconsole-eeclone.dts) does NOT - # include r3xs.dtsi, so there is no default `rk817-sound` - # node already active in the base DTS — both `amplified` - # and `simple` variants ship status="disabled". When the - # vendor DTB doesn't expose an amp GPIO we have to enable - # SOMETHING explicitly or `aplay -l` reports "no - # soundcards" (issue #35). Amplified is the safe default: - # the vast majority of R36S clones (V20 2024-05 onward) - # carry an external amp gated by a GPIO line that just - # isn't surfaced in the partial vendor DTB. Users on the - # rare amp-less clones can pick a _SRs (simple) overlay - # variant from the flasher. - rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-amplified' - args['logger'].info("audio: amplified fallback (SDCLONE without detectable amp gpio — eeclone base has no default rk817-sound)") - else: - # No amp GPIO detected, no SRs flag, no NAm flag, and the - # subdevice has a default rk817-sound active in its base - # DTS (original / soysauce — via r3xs.dtsi). Keep that - # default; previous behaviour preserved for everything - # that already worked under RC-3. - rk817_path = None - args['logger'].info("audio: keeping default rk817-sound (amp routing from base DTS)") - - # If we picked an explicit variant (amplified/simple/spko-direct), - # enable it AND disable the default rk817-sound so the kernel - # never sees two simple-audio-card instances competing for the - # rk817 codec / i2s pair. If rk817_path is None we keep the - # base DTS sound card as-is. - if rk817_path is not None: - overlay.set_property('status', 'okay', path=rk817_path) - default_path = hpdet_ovl.path + '/__overlay__/rk817-sound' - overlay.set_property('status', 'disabled', path=default_path) - - # Headphone-detect polarity needs to be inverted on a - # handful of boards (HPi flag). - if 'HPi' in args['flags']: - hpdet[2] = 0 if hpdet[2] != 0 else 1 - overlay.set_property('simple-audio-card,hp-det-gpio', - [0xffffffff, hpdet[1], hpdet[2]], - path=rk817_path) - add_fixup(overlay, gpio_sym, rk817_path+':simple-audio-card,hp-det-gpio:0') - - # Pinctrl override only when the vendor DTB actually defines - # /pinctrl/headphone/hp-det. Boards without that node use - # the base DTS pinctrl unchanged. - if hp_det_pins is not None and hp_det_pull_node is not None: - pins_path = hpdet_ovl.path+'/__overlay__/pinctrl/headphone/hp-det' - overlay.set_property('rockchip,pins', hp_det_pins[0:3] + [0xffffffff], path=pins_path) - if hp_det_pull_node.exist_property('bias-pull-down'): - add_fixup(overlay, 'pcfg_pull_down', pins_path+':rockchip,pins:12') - else: - add_fixup(overlay, 'pcfg_pull_up', pins_path+':rockchip,pins:12') - - args['logger'].info(f"hp-det-gpio {gpio_sym} on {hpdet_ovl.path}") - - except Exception as e: - import traceback - args['logger'].info(f"audio block: {e}\n{traceback.format_exc()}") - - # Fallback for boards where the vendor DTB lacks `hp-det-gpio` - # entirely (six Y3506 Soysauce V03/V04 batches). With NAm we - # still need to switch the active sound card to spko-direct, - # even though we can't propagate the headphone-detect pin from - # the vendor. The base DTS variant carries a sensible default - # hp-det-gpio so headphone detection still works on the panel - # the kernel actually ships for these boards. - if 'NAm' in args['flags']: - try: - hpdet_ovl_fb = add_overlay(overlay, '/') - spko_path = hpdet_ovl_fb.path + '/__overlay__/rk817-sound-spko-direct' - default_path = hpdet_ovl_fb.path + '/__overlay__/rk817-sound' - overlay.set_property('status', 'okay', path=spko_path) - overlay.set_property('status', 'disabled', path=default_path) - args['logger'].info("audio: spko-direct variant via fallback (NAm flag, no hp-det in vendor)") - except Exception as e2: - args['logger'].info(f"audio fallback also failed: {e2}") - - # Tier 3: walk any remaining vendor properties we haven't already - # handled and propagate them. Catches board-specific quirks (custom - # rumble flags, exotic input properties, etc.) without us needing - # to hardcode every possible vendor invention. - auto_discover_custom(dt, overlay, panel_ovl, jp_ovl, args) - - # Move fixups to the very end (if any) - if overlay.exist_node('__fixups__'): - fixups = overlay.get_node('__fixups__') - overlay.remove_node('__fixups__') - overlay.add_item(fixups) - - if overlay.exist_node('__local_fixups__'): - fixups = overlay.get_node('__local_fixups__') - overlay.remove_node('__local_fixups__') - overlay.add_item(fixups) - - # send the overlay to output - return overlay.to_dtb() - - -if __name__ == "__main__": - import argparse, logging - logging.basicConfig(level=logging.INFO) - logger = logging.getLogger("dtbo") - - parser = argparse.ArgumentParser(description="Generate a dtbo from a stock dtb") - parser.add_argument(dest="src", help="input stock dtb path", metavar="/path/to/stock.dtb") - parser.add_argument(dest="opts", help="dtbo options", nargs='?', metavar="LSi-HPi", default="") - parser.add_argument("-o", "--output", help="output (dtbo) path") - args = parser.parse_args() - - with open(args.src, 'rb') as f: - content = f.read() - - flags = args.opts.split('-') - flags = [ f for f in flags if f != ''] - dtbo = make_dtbo(content, {'flags': flags, 'logger': logger}) - - if args.output: - with open(args.output, 'wb') as f: - f.write(dtbo) - else: - sys.stdout.buffer.write(dtbo) diff --git a/config/mipi-generator/generator.sh b/config/mipi-generator/generator.sh deleted file mode 100755 index 684bc89dea..0000000000 --- a/config/mipi-generator/generator.sh +++ /dev/null @@ -1,232 +0,0 @@ -#!/bin/bash - -#============================================================================== -# Arch R - Generate Panel DTBO Overlays -#============================================================================== -# Each MB (motherboard) variant lives under config/archr-dts/// -# and ships its kernel DTB as rk3326-r36s-linux.dtb. We extract one DTBO per -# MB folder, named after the folder (spaces → underscores) so users can pick -# the exact MB instead of a generic "Panel N" that historically collided -# across distinct boards. -# -# Sources: -# config/archr-dts/clone//rk3326-r36s-linux.dtb -# config/archr-dts/original//rk3326-r36s-linux.dtb -# config/archr-dts/soysauce//rk3326-r36s-linux.dtb -# -# Outputs: -# config/mipi-generator/output/clone/.dtbo -# config/mipi-generator/output/original/.dtbo -# config/mipi-generator/output/soysauce/.dtbo -#============================================================================== - -set +e - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")" -DTS_ROOT="${ROOT_DIR}/config/archr-dts" -OUTPUT_BASE="${MIPI_OUT:-${ROOT_DIR}/config/mipi-generator/output}" -DTBO_TOOL="$SCRIPT_DIR/archr-dtbo.py" -INPUT_DTB_NAME="rk3326-r36s-linux.dtb" - -# Subdevices to process. Order matters only for log readability. -SUBDEVICES=(original clone soysauce) - -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' -log() { echo -e "${GREEN}[PANEL]${NC} $1"; } -warn() { echo -e "${YELLOW}[PANEL] WARNING:${NC} $1"; } -error() { echo -e "${RED}[PANEL] ERROR:${NC} $1"; exit 1; } - -command -v dtc &>/dev/null || error "dtc not found" -command -v python3 &>/dev/null || error "python3 not found" -python3 -c "import fdt" 2>/dev/null || error "Python fdt package not found. Install with: pip3 install fdt" -[ -f "$DTBO_TOOL" ] || error "archr-dtbo.py not found at: $DTBO_TOOL" - -GENERATED=0 -FAILED=0 -SKIPPED=0 - -# Map "G80C-MB V1.1-20250319 Panel 8" → "G80C-MB_V1.1-20250319_Panel_8". -# Spaces are the only character that needs taming; dashes, dots and digits -# are already filename-safe. -sanitize_mb_name() { - echo "${1// /_}" -} - -generate_overlay() { - local dtb="$1" - local out="$2" - local label="$3" - local flags="$4" # optional, e.g. "JPmm-SRs" - - local cmd=(python3 "$DTBO_TOOL" "$dtb") - [ -n "$flags" ] && cmd+=("$flags") - cmd+=(-o "$out") - - if "${cmd[@]}" 2>/dev/null; then - local sz=$(stat -c%s "$out") - log " OK: $(basename "$out") (${sz} bytes) [$label]" - GENERATED=$((GENERATED + 1)) - else - warn " archr-dtbo.py failed: $(basename "$out")" - FAILED=$((FAILED + 1)) - return 1 - fi -} - -# 6 variants per panel cover every joypad×audio override the user can pick -# from the flasher UI. Dno (skip vendor mode) is applied as a runtime string -# transform on panel_description so we don't need to multiply this set by 2. -# -# Default-joypad mapping: every R36S board we ship is K36-style except for -# the Y3506 family ("soysauce") which uses MyMini-style multi-ADC sticks. -# Our vendor DTBs are partial extracts that don't expose /adc-keys, so the -# generator can't auto-detect — we baked the choice in here per subdevice. -# -# Suffix pairs: | -# "" | "" -> default for the subdevice -# "JPk36" | "_JPk36" -> force K36 joypad -# "JPmm" | "_JPmm" -> force MyMini joypad -# "SRs" | "_SRs" -> force simple audio routing -# "JPk36-SRs" | "_JPk36_SRs" -> K36 joypad + simple audio -# "JPmm-SRs" | "_JPmm_SRs" -> MyMini joypad + simple audio -VARIANT_FLAGS_K36=("" "JPk36" "JPmm" "SRs" "JPk36-SRs" "JPmm-SRs") -VARIANT_SUFFIX_K36=("" "_JPk36" "_JPmm" "_SRs" "_JPk36_SRs" "_JPmm_SRs") -VARIANT_FLAGS_MM=("JPmm" "JPk36" "JPmm" "JPmm-SRs" "JPk36-SRs" "JPmm-SRs") -VARIANT_SUFFIX_MM=("" "_JPk36" "_JPmm" "_SRs" "_JPk36_SRs" "_JPmm_SRs") - -# Pick the variant flag/suffix arrays that match each subdevice's expected -# default. Every Y3506 (soysauce) vendor DTB we have inspected (V03 1104, -# V03 1210 2507/2533, V03 0317, V04 2528, V04 253x P6/P7, V04 2548, V05 -# 2551, V05 2601) ships odroidgo3-joypad with amux-count=4 and -# amux-channel-mapping — that's K36 (single-ADC + amux). The earlier -# assumption that Y3506 was MyMini was wrong, and forcing JPmm here -# made the overlay inject multi-ADC io-channels that the singleadc -# driver ignores, leaving the sticks dead (see issue #27). K36 is the -# safe default everywhere; MyMini boards (if any ever appear) can pick -# the _JPmm suffix variant explicitly. -default_variant_arrays() { - echo "K36" -} - -process_subdevice() { - local sd="$1" - local src_dir="${DTS_ROOT}/${sd}" - local out_dir="${OUTPUT_BASE}/${sd}" - - if [ ! -d "$src_dir" ]; then - warn "Subdevice source dir missing: $src_dir" - return - fi - - mkdir -p "$out_dir" - - log "" - log "=== ${sd} panel overlays ===" - log "Source: $src_dir" - log "Output: $out_dir" - - local kind="$(default_variant_arrays "$sd")" - local -n flags_arr="VARIANT_FLAGS_${kind}" - local -n suffix_arr="VARIANT_SUFFIX_${kind}" - log "Default joypad: ${kind} (${flags_arr[0]:-K36})" - - # SDORIG: trust the `odroidgo3 in compat` early-return in archr-dtbo.py. - # Original and soysauce kernel DTBs (rk3326-odroid-go2.dtb and - # rk3326-gameconsole-soysauce.dtb) already carry the correct - # reset-gpios / vcc18-lcd0 / backlight wiring, so the DTBO only needs - # the panel description. Clone hardware needs the GPIO overrides - # because the eeclone kernel DTB is wired differently from the actual - # boards; several clone vendor DTBs are mislabeled with `odroidgo3` - # compatible and previously slipped through the short-circuit, leaving - # the overlay without GPIO fixes (= "backlight on, no image"). - # - # SDCLONE: lets archr-dtbo.py know that the base DTS for this - # subdevice (rk3326-gameconsole-eeclone.dts) does NOT include the - # r3xs.dtsi `rk817-sound` default — both sound card variants ship - # with status="disabled". Without an explicit overlay to enable - # one, `aplay -l` finds no soundcards on those clones (issue #35). - # The audio block in archr-dtbo.py uses this flag to pick the - # `amplified` fallback when the vendor DTB doesn't expose enough - # to auto-classify between amplified / simple / spko-direct. - local sd_prefix="" - case "$sd" in - original|soysauce) sd_prefix="SDORIG" ;; - clone) sd_prefix="SDCLONE" ;; - esac - - # Soysauce (Y3506) boards have NO external speaker amplifier on - # the PCB; the rk817 SPKO line drives the speaker directly. The - # vendor BSP 4.4 hides this with hardcoded DAPM widgets in - # rk817_codec.c, but mainline ASoC respects the DT strictly, so - # without the NAm flag the speaker stays muted on every Y3506 - # board (most visibly on V05 where users actually use it). We - # append NAm to every soysauce overlay so the generator picks the - # `rk817-sound-spko-direct` card variant. - local audio_flag="" - case "$sd" in - soysauce) audio_flag="NAm" ;; - esac - - local count=0 - # Sort makes output deterministic across filesystems. - while IFS= read -r mb_dir; do - local mb_name="$(basename "$mb_dir")" - local input_dtb="${mb_dir}/${INPUT_DTB_NAME}" - - if [ ! -f "$input_dtb" ]; then - warn " ${mb_name}: missing ${INPUT_DTB_NAME}" - SKIPPED=$((SKIPPED + 1)) - continue - fi - - local sanitized="$(sanitize_mb_name "$mb_name")" - log " ${mb_name}" - - local i - for i in "${!flags_arr[@]}"; do - local flags="${flags_arr[$i]}" - local suffix="${suffix_arr[$i]}" - local out_file="${out_dir}/${sanitized}${suffix}.dtbo" - - # Compose the flag string in stable order: - # -- - local parts=() - [ -n "$sd_prefix" ] && parts+=("$sd_prefix") - [ -n "$audio_flag" ] && parts+=("$audio_flag") - [ -n "$flags" ] && parts+=("$flags") - local effective_flags - effective_flags="$(IFS=-; echo "${parts[*]}")" - - generate_overlay "$input_dtb" "$out_file" "${sd}/${mb_name}${suffix}" "$effective_flags" - done - count=$((count + 1)) - done < <(find "$src_dir" -mindepth 1 -maxdepth 1 -type d | sort) - - if [ "$count" -eq 0 ]; then - warn "${sd}: no MB folders found" - fi -} - -mkdir -p "$OUTPUT_BASE" - -for sd in "${SUBDEVICES[@]}"; do - process_subdevice "$sd" -done - -log "" -log "=== Panel Generation Complete ===" -log "Generated: ${GENERATED} Failed: ${FAILED} Skipped: ${SKIPPED}" - -for sd in "${SUBDEVICES[@]}"; do - out_dir="${OUTPUT_BASE}/${sd}" - [ -d "$out_dir" ] || continue - log "" - log "${sd} overlays: ${out_dir}/" - ls -1 "$out_dir"/*.dtbo 2>/dev/null | while read -r f; do - log " $(basename "$f") ($(stat -c%s "$f") bytes)" - done -done diff --git a/projects/ArchR/bootloader/mkimage b/projects/ArchR/bootloader/mkimage index de09352b9b..8aeef83ff0 100644 --- a/projects/ArchR/bootloader/mkimage +++ b/projects/ArchR/bootloader/mkimage @@ -84,18 +84,6 @@ mkimage_dtb() { mcopy "${RELEASE_DIR}/3rdparty/bootloader/device_trees/"*.dtb ::dtbs/ fi mcopy "${RELEASE_DIR}/3rdparty/bootloader/stock" :: - # Copy SUBDEVICE-specific panel overlays, fallback to generic - if [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays_${SUBDEVICE}" ]; then - echo "image: copying ${SUBDEVICE} panel overlays..." - mmd ::overlays 2>/dev/null || true - mcopy "${RELEASE_DIR}/3rdparty/bootloader/overlays_${SUBDEVICE}/"*.dtbo ::overlays/ - fi - # Copy soysauce overlays into original image (soysauce shares ADC with original) - if [ "${SUBDEVICE}" = "original" ] && [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays_soysauce" ]; then - echo "image: copying soysauce panel overlays..." - mmd ::overlays/soysauce 2>/dev/null || true - mcopy "${RELEASE_DIR}/3rdparty/bootloader/overlays_soysauce/"*.dtbo ::overlays/soysauce/ - fi ;; SM8550|SM8650|SM8250|SDM845) mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/boot" :: @@ -108,8 +96,10 @@ mkimage_dtb() { ;; esac - # For devices not handled above (RK3326 handles overlays in its own case) - if [ "$DEVICE" != "RK3326" ] && [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays" ]; then + # Ship the overlays/ folder (README only) for every device. Users + # generate their mipi-panel.dtbo on https://arch-r.io/overlay-generator/ + # and drop it into /flash/overlays/ themselves. + if [ -d "${RELEASE_DIR}/3rdparty/bootloader/overlays" ]; then echo "image: copying device tree overlays..." mcopy -s "${RELEASE_DIR}/3rdparty/bootloader/overlays" :: fi diff --git a/projects/ArchR/devices/RK3326/packages/u-boot/config/overlays/README.txt b/projects/ArchR/devices/RK3326/packages/u-boot/config/overlays/README.txt index 0360b6d208..0fd4ade5cf 100644 --- a/projects/ArchR/devices/RK3326/packages/u-boot/config/overlays/README.txt +++ b/projects/ArchR/devices/RK3326/packages/u-boot/config/overlays/README.txt @@ -1,12 +1,6 @@ -Here your device tree overlays live. -Currently only mipi-panel.dtbo is expected which is intended for display driver stuff. - -For R36s, rg351*-v2 and maybe other devices you may need to put a proper mipi-panel.dtbo -to make display work. -See https://arch-r.io/devices/unbranded/game-console-r35s-r36s/#new-displays-r36s-of-year-2024 - -Despite the name, mipi-panel.dtbo is also abused for quite a complex tuning -of EE clones of year 2025, but in this case the overlay is usually generated automatically. -In some cases (something is misdetected) you may want to replace mipi-panel.dtbo -with whatever you need. -See https://arch-r.io/devices/unbranded/EE-clones/#in-case-of-issues-with-displaysoundetc +Gere seu mipi-panel.dtbo em https://arch-r.io/overlay-generator/ e cole-o aqui. +Generate your mipi-panel.dtbo at https://arch-r.io/overlay-generator/ and place it here. +Générez votre mipi-panel.dtbo sur https://arch-r.io/overlay-generator/ et collez-le ici. +Genere su mipi-panel.dtbo en https://arch-r.io/overlay-generator/ y péguelo aquí. +在 https://arch-r.io/overlay-generator/ 生成你的 mipi-panel.dtbo 并放置到此处。 +Сгенерируйте ваш mipi-panel.dtbo на https://arch-r.io/overlay-generator/ и поместите его сюда. diff --git a/projects/ArchR/devices/RK3326/packages/u-boot/package.mk b/projects/ArchR/devices/RK3326/packages/u-boot/package.mk index 26de47a8aa..574b565c7f 100644 --- a/projects/ArchR/devices/RK3326/packages/u-boot/package.mk +++ b/projects/ArchR/devices/RK3326/packages/u-boot/package.mk @@ -100,32 +100,9 @@ makeinstall_target() { find_dir_path config/stock && cp -av ${FOUND_PATH} "${INSTALL}/usr/share/bootloader/" - # Generate MIPI panel overlays - MIPI_GEN="${ROOT}/config/mipi-generator" - MIPI_OUT="${MIPI_GEN}/output" - if [ -x "${MIPI_GEN}/generator.sh" ]; then - echo "Generating MIPI panel overlays..." - bash "${MIPI_GEN}/generator.sh" || echo "WARNING: Panel overlay generation failed (non-fatal)" - fi - - # Install per-SUBDEVICE panel overlays (original + clone) - for sd in ${SUBDEVICES}; do - mkdir -p "${INSTALL}/usr/share/bootloader/overlays_${sd}" - # First try pre-generated from mipi-generator output - if [ -d "${MIPI_OUT}/${sd}" ]; then - cp -av "${MIPI_OUT}/${sd}/"*.dtbo "${INSTALL}/usr/share/bootloader/overlays_${sd}/" 2>/dev/null || true - fi - # Then overlay with any from config dir (manual overrides) - if find_dir_path config/overlays_${sd}; then - cp -av ${FOUND_PATH}/*.dtbo "${INSTALL}/usr/share/bootloader/overlays_${sd}/" 2>/dev/null || true - fi - done - # Install soysauce panel overlays (included in original image) - if [ -d "${MIPI_OUT}/soysauce" ]; then - mkdir -p "${INSTALL}/usr/share/bootloader/overlays_soysauce" - cp -av "${MIPI_OUT}/soysauce/"*.dtbo "${INSTALL}/usr/share/bootloader/overlays_soysauce/" 2>/dev/null || true - fi - - # Also install generic overlays dir (README, fallback) + # Install overlays dir. We no longer ship pre-built panel DTBOs: + # users generate mipi-panel.dtbo on https://arch-r.io/overlay-generator/ + # and drop it into /flash/overlays/ themselves (the README explains + # this in six languages). find_dir_path config/overlays && cp -av ${FOUND_PATH} "${INSTALL}/usr/share/bootloader/" }