From 5b8dc27a79ffa90254e7252b8e8e365570d76bd3 Mon Sep 17 00:00:00 2001 From: Eduard Iten Date: Wed, 3 Dec 2025 10:06:00 +0100 Subject: [PATCH] Add comprehensive installation documentation - Created bilingual installation guides (German/English) - Added detailed kernel driver diagnosis procedures - Included step-by-step Device Tree Overlay setup - Enhanced troubleshooting for Rock OS CAN support - Updated README files with latest specifications - Removed obsolete CSV export file --- EWS.csv | 52 ------------------ README.de.md | 24 ++++----- README.md | 26 ++++----- doc/Installation.de.md | 119 +++++++++++++++++++++++++++++++++++++++++ doc/Installation.en.md | 119 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 263 insertions(+), 77 deletions(-) delete mode 100644 EWS.csv create mode 100644 doc/Installation.de.md create mode 100644 doc/Installation.en.md diff --git a/EWS.csv b/EWS.csv deleted file mode 100644 index 337672e..0000000 --- a/EWS.csv +++ /dev/null @@ -1,52 +0,0 @@ -"Reference","Qty","Value","Footprint","LCSC Part #","Manufacturer Part #" -"C201,C405","2","100u","Capacitor_SMD:CP_Elec_6.3x7.7","C3151829","RVT1H101M0607" -"C202,C204,C205,C206","4","10u","Capacitor_SMD:C_1206_3216Metric","C13585","CL31A106KBHNNNE" -"C203,C207,C211","3","1u","Capacitor_SMD:C_0402_1005Metric","","" -"C208,C210,C301,C302,C401,C403,C404","7","100n","Capacitor_SMD:C_0402_1005Metric","","" -"C209","1","4u7","Capacitor_SMD:C_0402_1005Metric","C23733","CL05A475MP5NRNC" -"C212","1","220p","Capacitor_SMD:C_0603_1608Metric","","" -"C213","1","1n","Capacitor_SMD:C_0402_1005Metric","","" -"C214,C215,C216,C217,C303,C304,C406,C407","8","22u","Capacitor_SMD:C_1206_3216Metric","","" -"C402","1","10u","Capacitor_SMD:C_0603_1608Metric","","" -"D401","1","BZT52C15S","Diode_SMD:D_SOD-323","C19077448","BZT52C15S" -"D402","1","NUP2105L","Package_TO_SOT_SMD:SOT-23","","" -"D403","1","SMAJ26A","Diode_SMD:D_SMA","","" -"D404,D405","2","1N5819WS","Diode_SMD:D_SOD-323","","" -"F201","1","3A","Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder","","" -"F401,F402","2","5A","Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder","","" -"F403","1","4A","Fuse:Fuse_0805_2012Metric","C49305071","BSMD0805L-400" -"F404,F405","2","1.5A","Fuse:Fuse_0805_2012Metric","C914095","BSMD0805L-150" -"J301","1","GPIO","","","" -"J302","1","FAN","Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical","","" -"J401","1","PWR IN","Connector_AMASS:AMASS_XT30PW-M_1x02_P2.50mm_Horizontal","","" -"J402","1","Toolhead 1","Connector_Molex:Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_Horizontal","","" -"J403","1","Toolhead 2","Connector_Molex:Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_Horizontal","","" -"J404","1","XH","Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical","","" -"J405","1","IN","Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal","C2765186","TYPE-C 16PIN 2MD(073)" -"J406","1","OUT","Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal","C2765186","TYPE-C 16PIN 2MD(073)" -"J407","1","OUT","Connector_USB:USB_A_Wuerth_614004134726_Horizontal","C18077685","BX-TYPE-A-MCC4P" -"JP301,JP306","2","Jumper_3_Open","Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical","","" -"JP302,JP303,JP304,JP305,JP401","5","~","Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical","","" -"L201","1","3.3uH","Inductor_SMD:L_APV_APH1050","C2847560","MDA1050-3R3M" -"Q301","1","AO3400A","Package_TO_SOT_SMD:SOT-23","","" -"Q401","1","CJAC70P06","Package_DFN_QFN:AO_DFN-8-1EP_5.55x5.2mm_P1.27mm_EP4.12x4.6mm","","" -"R201","1","100k","Resistor_SMD:R_0402_1005Metric","","" -"R202,R301,R305,R406,R408","5","10k","Resistor_SMD:R_0402_1005Metric","","" -"R203,R401,R402","3","30k","Resistor_SMD:R_0402_1005Metric","","" -"R204","1","5k6","Resistor_SMD:R_0402_1005Metric","","" -"R205","1","1R","Resistor_SMD:R_0603_1608Metric","","" -"R206","1","15.5k","Resistor_SMD:R_0402_1005Metric","","" -"R207","1","2k","Resistor_SMD:R_0402_1005Metric","","" -"R208","1","2k2","Resistor_SMD:R_0402_1005Metric","","" -"R302,R303,R304,R404","4","1k","Resistor_SMD:R_0402_1005Metric","","" -"R403","1","120R","Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolder","","" -"R405,R407","2","5k1","Resistor_SMD:R_0402_1005Metric","","" -"SW301","1","BOOT0","Button_Switch_SMD:SW_SPST_TS-1088-xR020","","" -"SW302","1","RST","Button_Switch_SMD:SW_SPST_TS-1088-xR020","","" -"TP301,TP302,TP303,TP304","4","3V3,GND,SWCLK,SWDIO","project:NAMED_TEST_POINT","","" -"U201","1","XC6206PxxxMR","Package_TO_SOT_SMD:SOT-23-3","","" -"U202","1","XR76208","project:IC_XR76203ELTR-F","","" -"U301","1","STM32G0B1KBUx","Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm","","" -"U401","1","TJA1051TK-3","Package_SON:HVSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm","","" -"U402","1","CH334F","Package_DFN_QFN:QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","","" -"U403,U404,U405","3","USBLC6-2SC6","Package_TO_SOT_SMD:SOT-23-6","","" diff --git a/README.de.md b/README.de.md index d3c0ecd..dd18ad6 100644 --- a/README.de.md +++ b/README.de.md @@ -55,7 +55,7 @@ Das Board adressiert häufige Problemstellen in Voron-Builds durch robuste Strom - **Anschlüsse:** XT30PW-F (liegend) oder 5.08mm Schraubklemme - **Verpolschutz:** P-Channel MOSFET (CJAC70P06, -60V, -70A, RDSon ca. 8mOhm) - **Gate-Schutz MOSFET:** 15V Zener-Diode (BZT52C15S) zwischen Source und Gate -- **Spannungsteiler:** 30kOhm (Gate-Source) und 30kOhm (Gate-GND) +- **Spannungsteiler:** 30kΩ (Gate-Source) und 30kΩ (Gate-GND) - **Überspannungsschutz:** TVS-Diode (SMAJ26A, 26V Standoff, Unidirektional) platziert NACH dem MOSFET gegen GND - **Eingangssicherung:** Verteilte Absicherung (5A für DC/DC, je 5A für CAN-Anschlüsse) @@ -70,8 +70,8 @@ Das Board adressiert häufige Problemstellen in Voron-Builds durch robuste Strom - **Ausgangskondensatoren:** 4x 22µF 1206 Keramik - **Stabilität:** Feed-Forward Kondensator (Cff) 1nF parallel zum oberen Feedback-Widerstand - **Soft-Start:** 100nF an Pin SS (ca. 6ms Anlaufzeit) -- **Stromlimit:** 5.6kOhm Widerstand am ILIM Pin -- **Enable:** Spannungsteiler von 24V (100kOhm oben, 22kOhm unten) = ca. 4.3V am Pin +- **Stromlimit:** 5.1kΩ Widerstand (~10.2A Grenzwert) +- **Enable:** Spannungsteiler von 24V (100kΩ oben, 22kΩ unten) = ca. 4.3V am Pin ### 🔌 Logik-Spannungsversorgung (Power Path) @@ -89,11 +89,11 @@ Das Board adressiert häufige Problemstellen in Voron-Builds durch robuste Strom - **Pi-Verbindung:** - USB (PA11/PA12) an USB-Hub - UART (PA9/PA10) an Pi-Header (Pin 8/10) über Jumper trennbar - - NRST an Pi GPIO 22 (via 1kOhm) + Taster gegen GND + 100nF Cap - - BOOT0 (Pin 24/PA14 shared mit SWCLK) an Pi GPIO 27 (via 1kOhm) + Taster gegen 3.3V + 10kOhm Pull-Down + - NRST an Pi GPIO 22 (via 1kΩ) + Taster gegen GND + 100nF Cap + - BOOT0 (Pin 24/PA14 shared mit SWCLK) an Pi GPIO 27 (via 1kΩ) + Taster gegen 3.3V + 10kΩ Pull-Down - **CAN-Transceiver:** MCP2542WFD (oder kompatibel) -- **Muxing:** Jumper wählbar zwischen STM32 (USB-CAN Bridge) und Rock/Pi Native GPIOs (Pin 3/5) -- **Terminierung:** 120 Ohm Widerstand, zuschaltbar per DIP-Switch (direkt an den Buchsen) +- **Muxing:** Jumper wählbar zwischen STM32 (USB-CAN Bridge) und Rock/Pi Native GPIOs (Pin 3/5). Bei ROCK 5B/5B+ kann über Jumper gewählt werden, ob CAN vom Onboard-STM32G0B1 kommt oder nativ an den Rockchip geht (über GPIO-Leiste Pin 3 (CAN-RX) und Pin 5 (CAN-TX)) +- **Terminierung:** 120 Ω Widerstand, zuschaltbar per Jumper (direkt an den Buchsen) - **CAN-Anschlüsse:** 2x Molex Micro-Fit 3.0 (2x2) - **Micro-Fit Pinout:** Pin 1=24V, Pin 2=GND (Obere Reihe), Pin 3=CAN_H, Pin 4=CAN_L (Untere Reihe) - **CAN-Stromabsicherung:** Je 5A SMD 1812 Slow Blow pro Port @@ -123,11 +123,11 @@ Das Board adressiert häufige Problemstellen in Voron-Builds durch robuste Strom ### 🌊 Lüftersteuerung -- **Anschluss:** Dual-Footprint JST-XH (2.54mm) und JST-PH 2-Pin parallel +- **Anschluss:** JST-XH 2-Pin - **Treiber:** N-Channel MOSFET (AO3400) - **STM32 Pin:** PA8 (Timer 1, Hardware PWM fähig) -- **Fail-Safe:** 10kOhm Pull-Up Widerstand vom Gate nach 3.3V (Lüfter läuft 100% bei Reset/Flash-Vorgang) -- **Gate-Serienwiderstand:** 1kOhm +- **Fail-Safe:** 10kΩ Pull-Up Widerstand vom Gate nach 3.3V (Lüfter läuft 100% bei Reset/Flash-Vorgang) +- **Gate-Serienwiderstand:** 1kΩ ## 📋 Klipper Konfiguration @@ -183,7 +183,7 @@ pid_kd: 2.0 - **JST-XH Intern:** 5V, D-, D+, GND ### Lüftersteuerung -- **JST-XH/PH 2-pin:** PWM Lüftersteuerung (5V Schaltung) +- **JST-XH 2-pin:** Lüftersteuerung (Pin 1: +5V, Pin 2: GND/PWM) ## 🛠️ PCB Spezifikationen @@ -206,7 +206,7 @@ pid_kd: 2.0 ### PCB-Fertigung - **Kupferdicke:** **2oz Kupfer empfohlen** für verbesserte thermische Leistung und Strombelastbarkeit - **Via-Spezifikationen:** Minimum 12-20 Vias am DC/DC-Ausgang für Thermal Management -- **Impedanzkontrolle:** 90 Ohm Differentiell für USB-Leiterbahnen (D+/D- Paare) +- **Impedanzkontrolle:** 90 Ω Differentiell für USB-Leiterbahnen (D+/D- Paare) ### Bestückungshinweise - **24V Pfad:** Minimum 3mm Leiterbahnbreite auf Top & Bottom Layern für 12A Gesamtstrom diff --git a/README.md b/README.md index bd0aa2f..3c2f3df 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ The board addresses common pain points in Voron builds by providing robust power - **Connectors:** XT30PW-F (horizontal) or 5.08mm screw terminal - **Reverse Polarity Protection:** P-Channel MOSFET (CJAC70P06, -60V, -70A, RDSon ~8mOhm) - **MOSFET Gate Protection:** 15V Zener diode (BZT52C15S) between Source and Gate -- **Voltage Divider:** 30kOhm (Gate-Source) and 30kOhm (Gate-GND) +- **Voltage Divider:** 30kΩ (Gate-Source) and 30kΩ (Gate-GND) - **Overvoltage Protection:** TVS diode (SMAJ26A, 26V Standoff, Unidirectional) placed AFTER MOSFET to GND - **Input Protection:** Distributed fusing (5A for DC/DC, 5A each for CAN ports) @@ -70,8 +70,8 @@ The board addresses common pain points in Voron builds by providing robust power - **Output Capacitors:** 4x 22µF 1206 ceramic - **Stability:** Feed-forward capacitor (Cff) 1nF parallel to upper feedback resistor - **Soft-Start:** 100nF at SS pin (~6ms startup time) -- **Current Limit:** 5.6kOhm resistor at ILIM pin -- **Enable:** Voltage divider from 24V (100kOhm upper, 22kOhm lower) = ~4.3V at pin +- **Current Limit:** 5.1kΩ resistor (~10.2A limit) +- **Enable:** Voltage divider from 24V (100kΩ upper, 22kΩ lower) = ~4.3V at pin ### 🔌 Logic Power Supply (Power Path) @@ -89,11 +89,11 @@ The board addresses common pain points in Voron builds by providing robust power - **Pi Connection:** - USB (PA11/PA12) to USB Hub - UART (PA9/PA10) to Pi Header (Pin 8/10) via jumperable connection - - NRST to Pi GPIO 22 (via 1kOhm) + button to GND + 100nF cap - - BOOT0 (Pin 24/PA14 shared with SWCLK) to Pi GPIO 27 (via 1kOhm) + button to 3.3V + 10kOhm pull-down + - NRST to Pi GPIO 22 (via 1kΩ) + button to GND + 100nF cap + - BOOT0 (Pin 24/PA14 shared with SWCLK) to Pi GPIO 27 (via 1kΩ) + button to 3.3V + 10kΩ pull-down - **CAN Transceiver:** MCP2542WFD (or compatible) -- **Muxing:** Jumper selectable between STM32 (USB-CAN Bridge) and Rock/Pi Native GPIOs (Pin 3/5) -- **Termination:** 120 Ohm resistor, switchable per DIP switch (directly at connectors) +- **Muxing:** Jumper selectable between STM32 (USB-CAN Bridge) and Rock/Pi Native GPIOs (Pin 3/5). For ROCK 5B/5B+, jumpers can select whether CAN comes from onboard STM32G0B1 or goes natively to Rockchip (via GPIO header Pin 3 (CAN-RX) and Pin 5 (CAN-TX)) +- **Termination:** 120 Ω resistor, switchable per jumper (directly at connectors) - **CAN Connectors:** 2x Molex Micro-Fit 3.0 (2x2) - **Micro-Fit Pinout:** Pin 1=24V, Pin 2=GND (upper row), Pin 3=CAN_H, Pin 4=CAN_L (lower row) - **CAN Power Protection:** 5A SMD 1812 Slow Blow per port @@ -115,7 +115,7 @@ The board addresses common pain points in Voron builds by providing robust power - **Concept:** 100µF electrolytic tank at +5V_PWR, followed by polyfuse, followed by 22µF ceramic at connector - **USB-C Port (Screen):** - Polyfuse: 4.0A hold current (hot chamber derating considered) - - CC Lines: CC1 and CC2 each with 10kOhm resistor to VBUS (behind fuse) for 3A advertisement + - CC Lines: CC1 and CC2 each with 10kΩ resistor to VBUS (behind fuse) for 3A advertisement - ESD Protection: SRV05-4 TVS array - **USB-A Port (Webcam):** - Polyfuse: 1.5A hold current @@ -123,11 +123,11 @@ The board addresses common pain points in Voron builds by providing robust power ### 🌊 Fan Control -- **Connector:** Dual-footprint JST-XH (2.54mm) and JST-PH 2-pin parallel +- **Connector:** JST-XH 2-pin - **Driver:** N-Channel MOSFET (AO3400) - **STM32 Pin:** PA8 (Timer 1, hardware PWM capable) -- **Fail-Safe:** 10kOhm pull-up resistor from gate to 3.3V (fan runs 100% during reset/flash) -- **Gate Series Resistance:** 1kOhm +- **Fail-Safe:** 10kΩ pull-up resistor from gate to 3.3V (fan runs 100% during reset/flash) +- **Gate Series Resistance:** 1kΩ ## 📋 Klipper Configuration @@ -183,7 +183,7 @@ pid_kd: 2.0 - **JST-XH Internal:** 5V, D-, D+, GND ### Fan Control -- **JST-XH/PH 2-pin:** PWM fan control (5V switching) +- **JST-XH 2-pin:** Fan control (Pin 1: +5V, Pin 2: GND/PWM) ## 🛠️ PCB Specifications @@ -206,7 +206,7 @@ pid_kd: 2.0 ### PCB Manufacturing - **Copper Weight:** **2oz copper recommended** for improved thermal performance and current handling - **Via Specifications:** Minimum 12-20 vias at DC/DC output for thermal management -- **Impedance Control:** 90 Ohm differential for USB traces (D+/D- pairs) +- **Impedance Control:** 90 Ω differential for USB traces (D+/D- pairs) ### Assembly Notes - **24V Path:** Minimum 3mm trace width on top & bottom layers for 12A total current diff --git a/doc/Installation.de.md b/doc/Installation.de.md new file mode 100644 index 0000000..2f0f6b1 --- /dev/null +++ b/doc/Installation.de.md @@ -0,0 +1,119 @@ +# 🛠️ EWS Installation Guide + +> 🌍 **Sprachen:** [English](Installation.en.md) | [Deutsch](Installation.de.md) + +Ein umfassender Leitfaden zur Installation des Device Tree Overlays und der Kernelmodule für das Universal Voron Power & CAN HAT (EWS). + +## 📚 Inhaltsverzeichnis + +- [🛠️ EWS Installation Guide](#️-ews-installation-guide) + - [📚 Inhaltsverzeichnis](#-inhaltsverzeichnis) + - [🏔️ Radxa Rock OS](#️-radxa-rock-os) + - [🔍 Kernel-Treiber Diagnose](#-kernel-treiber-diagnose) + - [📄 Device Tree Setup (DTS)](#-device-tree-setup-dts) + - [⚠️ Wichtige Hinweise](#️-wichtige-hinweise) + +## 🏔️ Radxa Rock OS + +Beim Rock OS variiert die CAN-Unterstützung von Version zu Version. Eine sorgfältige Diagnose ist daher vor der Installation erforderlich. + +### 🔍 Kernel-Treiber Diagnose + +#### Schritt 1: Verfügbare Module prüfen +Zuerst überprüfen wir, ob die erforderlichen Kernelmodule vorhanden sind: + +```bash +find /lib/modules/$(uname -r)/kernel/drivers/net/can -name "*.ko*" +``` + +Sind in der Liste Dateien mit Namen enthalten, die `rockchip_canfd` oder `m_can` enthalten, sind die Module vorhanden und alles sollte funktionieren. + +#### Schritt 2: Kernel-Konfiguration überprüfen +Falls keine Module gefunden wurden, prüfen wir die Kernel-Konfiguration: + +```bash +grep -E "CONFIG_CAN_ROCKCHIP|CONFIG_CAN_FD" /boot/config-$(uname -r) +``` + +#### 🚦 Diagnose-Ergebnisse + +##### ✅ Fall A: `CONFIG_CAN_ROCKCHIP=y` +- **Status:** ✅ OK +- **Bedeutung:** Der Treiber ist fest im Kernel integriert +- **Hinweis:** Erscheint NICHT unter `lsmod` und hat keine `.ko` Datei +- **Aktion:** Das Overlay reicht zur Aktivierung + +##### ⚠️ Fall B: `CONFIG_CAN_ROCKCHIP=m` +- **Status:** ⚠️ Prüfung erforderlich +- **Bedeutung:** Der Treiber ist ein ladbares Modul +- **Prüfung:** Modul-Datei suchen: + ```bash + find /lib/modules/$(uname -r) -name "rockchip_canfd.ko*" + ``` +- **Falls Datei fehlt:** Kernel-Pakete reinstallieren: + ```bash + sudo apt install --reinstall linux-image-rk3588* + ``` + +##### ❌ Fall C: `# CONFIG_CAN_ROCKCHIP is not set` +- **Status:** ❌ KRITISCHER FEHLER +- **Symptom:** Ausgabe enthält `# CONFIG_CAN_ROCKCHIP is not set` und meist auch `# CONFIG_CAN_M_CAN is not set` +- **Bedeutung:** Kernel wurde ohne CAN-Controller-Unterstützung kompiliert +- **Problem:** Der Treiber fehlt komplett +- **DKMS-Option:** ⚠️ Praktisch unmöglich bei SoC-internen Treibern +- **Lösung:** 🔄 Zwingender Wechsel des Betriebssystems/Kernels (z.B. Armbian Vendor Kernel) + +### 📄 Device Tree Setup (DTS) + +Nach erfolgreicher Kernel-Diagnose kann das CAN-Overlay installiert werden: + +#### Installation über Radxa Setup-Tool + +1. **📁 Verzeichnis wechseln** + ```bash + cd dts + ``` + +2. **🛠️ Radxa Setup starten** + ```bash + sudo rsetup + ``` + +3. **🧭 Navigation im Setup-Menü** + - Navigiere zu `Overlays` ➜ `Install 3rd party overlay` + +4. **📋 Overlay auswählen** + - Wähle `rk3588-can1-m1.dts` aus der Liste + +5. **🔄 System neustarten** + ```bash + sudo reboot + ``` + +#### ✅ Installation verifizieren + +Nach dem Neustart sollte die CAN-Schnittstelle verfügbar sein: + +```bash +ip link show can1 +``` + +**Erwartete Ausgabe:** +``` +3: can1: mtu 72 qdisc noop state DOWN mode DEFAULT group default qlen 10 + link/can +``` + +## ⚠️ Wichtige Hinweise + +- 🔧 **Jumper-Einstellungen:** Stelle sicher, dass alle Jumper auf dem EWS-Board korrekt gesetzt sind +- 🚨 **Neustart erforderlich:** Das System muss nach der Overlay-Installation neu gestartet werden +- 📋 **Interface-Name:** Die CAN-Schnittstelle wird als `can1` im System verfügbar sein +- 🔌 **Verkabelung:** Überprüfe alle Verbindungen vor der ersten Inbetriebnahme +- 🏔️ **OS-Kompatibilität:** Diese Anleitung bezieht sich speziell auf Radxa Rock OS + +--- + +> **💡 Tipp:** Bei persistenten Problemen empfiehlt sich der Wechsel zu Armbian mit Vendor Kernel für bessere CAN-Unterstützung. + +> **Hinweis:** Dies ist die Originaldokumentation in deutscher Sprache. Eine englische Übersetzung finden Sie in [Installation.en.md](Installation.en.md). \ No newline at end of file diff --git a/doc/Installation.en.md b/doc/Installation.en.md new file mode 100644 index 0000000..6d47c0c --- /dev/null +++ b/doc/Installation.en.md @@ -0,0 +1,119 @@ +# 🛠️ EWS Installation Guide + +> 🌍 **Languages:** [English](Installation.en.md) | [Deutsch](Installation.de.md) + +A comprehensive guide for installing the Device Tree Overlay and kernel modules for the Universal Voron Power & CAN HAT (EWS). + +## 📚 Table of Contents + +- [🛠️ EWS Installation Guide](#️-ews-installation-guide) + - [📚 Table of Contents](#-table-of-contents) + - [🏔️ Radxa Rock OS](#️-radxa-rock-os) + - [🔍 Kernel Driver Diagnosis](#-kernel-driver-diagnosis) + - [📄 Device Tree Setup (DTS)](#-device-tree-setup-dts) + - [⚠️ Important Notes](#️-important-notes) + +## 🏔️ Radxa Rock OS + +CAN support in Rock OS varies from version to version. Careful diagnosis is therefore required before installation. + +### 🔍 Kernel Driver Diagnosis + +#### Step 1: Check Available Modules +First, we check if the required kernel modules are present: + +```bash +find /lib/modules/$(uname -r)/kernel/drivers/net/can -name "*.ko*" +``` + +If the list contains files with names that include `rockchip_canfd` or `m_can`, the modules are present and everything should work. + +#### Step 2: Check Kernel Configuration +If no modules were found, we check the kernel configuration: + +```bash +grep -E "CONFIG_CAN_ROCKCHIP|CONFIG_CAN_FD" /boot/config-$(uname -r) +``` + +#### 🚦 Diagnosis Results + +##### ✅ Case A: `CONFIG_CAN_ROCKCHIP=y` +- **Status:** ✅ OK +- **Meaning:** The driver is built into the kernel +- **Note:** Does NOT appear under `lsmod` and has no `.ko` file +- **Action:** The overlay is sufficient for activation + +##### ⚠️ Case B: `CONFIG_CAN_ROCKCHIP=m` +- **Status:** ⚠️ Check required +- **Meaning:** The driver is a loadable module +- **Check:** Search for module file: + ```bash + find /lib/modules/$(uname -r) -name "rockchip_canfd.ko*" + ``` +- **If file missing:** Reinstall kernel packages: + ```bash + sudo apt install --reinstall linux-image-rk3588* + ``` + +##### ❌ Case C: `# CONFIG_CAN_ROCKCHIP is not set` +- **Status:** ❌ CRITICAL ERROR +- **Symptom:** Output contains `# CONFIG_CAN_ROCKCHIP is not set` and usually also `# CONFIG_CAN_M_CAN is not set` +- **Meaning:** Kernel was compiled without CAN controller support +- **Problem:** The driver is completely missing +- **DKMS Option:** ⚠️ Practically impossible with SoC-internal drivers +- **Solution:** 🔄 Mandatory change of operating system/kernel (e.g. Armbian Vendor Kernel) + +### 📄 Device Tree Setup (DTS) + +After successful kernel diagnosis, the CAN overlay can be installed: + +#### Installation via Radxa Setup Tool + +1. **📁 Change Directory** + ```bash + cd dts + ``` + +2. **🛠️ Start Radxa Setup** + ```bash + sudo rsetup + ``` + +3. **🧭 Navigation in Setup Menu** + - Navigate to `Overlays` ➜ `Install 3rd party overlay` + +4. **📋 Select Overlay** + - Choose `rk3588-can1-m1.dts` from the list + +5. **🔄 Restart System** + ```bash + sudo reboot + ``` + +#### ✅ Verify Installation + +After reboot, the CAN interface should be available: + +```bash +ip link show can1 +``` + +**Expected Output:** +``` +3: can1: mtu 72 qdisc noop state DOWN mode DEFAULT group default qlen 10 + link/can +``` + +## ⚠️ Important Notes + +- 🔧 **Jumper Settings:** Ensure all jumpers on the EWS board are set correctly +- 🚨 **Reboot Required:** The system must be restarted after overlay installation +- 📋 **Interface Name:** The CAN interface will be available as `can1` in the system +- 🔌 **Wiring:** Check all connections before first operation +- 🏔️ **OS Compatibility:** This guide specifically refers to Radxa Rock OS + +--- + +> **💡 Tip:** For persistent problems, switching to Armbian with Vendor Kernel is recommended for better CAN support. + +> **Note:** The original documentation is in German ([Installation.de.md](Installation.de.md)). This English version is a translation for international users. \ No newline at end of file