ShiboSoftwareDev/f1c100s-linux-stepper-controller
A four-layer Linux motor-control carrier built around an Allwinner F1C100S SoC, USB‑C, SPI flash, multi-rail power regulation, DRV8825 stepper-driver stage with protection/current sensing, temperature monitoring, and external I/O connectors.
- Version
- 0.1.1
- License
- unset
- Stars
- 0
firmware/carrier.dtsi
/* Include after suniv-f1c100s.dtsi in your board DTS. This is a hardware
* integration fragment, not a complete bootable board description. */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
aliases { serial0 = &uart0; i2c0 = &i2c0; spi0 = &spi0; spi1 = &spi1; };
chosen { stdout-path = "serial0:115200n8"; };
/* Motor control remains userspace GPIO so the driver stays disabled until
* Linux intentionally arms it. PE2 STEP, PE3 DIR, PE4 ENABLE (active high),
* PE5 nFAULT and PE6 TMP102 ALERT. A board-level 100 kOhm pulldown keeps
* PE4 safe throughout reset and early boot. */
};
&pio {
carrier_i2c0: i2c0-pe-pins { pins = "PE11", "PE12"; function = "i2c0"; };
carrier_spi1: spi1-pe-pins { pins = "PE7", "PE8", "PE9", "PE10"; function = "spi1"; };
};
&uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pe_pins>; status = "okay"; };
&i2c0 {
pinctrl-names = "default"; pinctrl-0 = <&carrier_i2c0>;
clock-frequency = <100000>; status = "okay";
temperature-sensor@48 {
compatible = "ti,tmp102";
reg = <0x48>;
interrupt-parent = <&pio>;
interrupts = <4 6 IRQ_TYPE_LEVEL_LOW>; /* PE6 */
};
};
&spi0 {
pinctrl-names = "default"; pinctrl-0 = <&spi0_pc_pins>; status = "okay";
flash@0 {
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>; spi-max-frequency = <24000000>;
/* Partition layout must match your SPL/U-Boot/Linux image. */
};
};
&spi1 {
pinctrl-names = "default"; pinctrl-0 = <&carrier_spi1>; status = "okay";
/* Add your real SPI peripheral at CS0; start at <= 1 MHz over the cable.
* Do not use a fictitious compatible string just to bind spidev. */
};
&usb_otg { dr_mode = "peripheral"; status = "okay"; };
&usbphy { status = "okay"; };