├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── build.sh ├── debian ├── compat ├── control ├── libretech-dtoverlay.alternatives ├── libretech-dtoverlay.install ├── libretech-gpio.alternatives ├── libretech-gpio.install └── rules ├── include ├── dt-bindings │ ├── clock │ │ ├── gxbb-aoclkc.h │ │ └── gxbb-clkc.h │ ├── gpio │ │ ├── gpio.h │ │ ├── meson-g12a-gpio.h │ │ └── meson-gxl-gpio.h │ ├── interrupt-controller │ │ ├── amlogic,meson-g12a-gpio-intc.h │ │ ├── amlogic,meson-gxl-gpio-intc.h │ │ └── irq.h │ ├── pinctrl │ │ └── rockchip.h │ ├── reset │ │ ├── amlogic,meson-g12a-audio-reset.h │ │ ├── amlogic,meson-g12a-reset.h │ │ └── amlogic,meson-gxbb-reset.h │ ├── sound │ │ ├── meson-aiu.h │ │ ├── meson-g12a-toacodec.h │ │ └── meson-g12a-tohdmitx.h │ └── thermal │ │ └── thermal.h └── update.sh ├── install.sh ├── ldto ├── lgpio ├── libre-computer ├── all-h3-cc-h3 │ ├── dt │ ├── dt.config │ ├── dt.map │ └── gpio.map ├── all-h3-cc-h5 │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── i2c-0.dts │ │ ├── i2c-1.dts │ │ ├── i2c-2.dts │ │ ├── i2c0-twi0.dts │ │ ├── i2c1-twi1.dts │ │ ├── i2c2-camera.dts │ │ ├── pwm-0.dts │ │ ├── pwm-disable-uart.dts │ │ ├── spdif.dts │ │ ├── spi-0-1cs-spidev.dts │ │ ├── spi-0-1cs.dts │ │ ├── spi-0-2cs-ili9486-xpt2046.dts │ │ ├── spi-0-2cs-mhs3528.dts │ │ ├── spi-0-2cs-mpi3501.dts │ │ ├── spi-0-2cs-spidev.dts │ │ ├── spi-0-2cs.dts │ │ ├── spi-1-1cs-spidev.dts │ │ ├── spi-1-1cs.dts │ │ ├── spi0-cs1-ili9486-xpt2046.dts │ │ ├── spi0-cs1-spidev.dts │ │ ├── spi0-cs1.dts │ │ ├── spi0-spidev.dts │ │ ├── spi0.dts │ │ ├── spi1-cs1.dts │ │ ├── spi1-spidev.dts │ │ ├── uart-1-rts-cts.dts │ │ ├── uart-1.dts │ │ ├── uart-2-rts-cts.dts │ │ ├── uart-2.dts │ │ ├── uart-3-rts-cts.dts │ │ ├── uart-3.dts │ │ ├── uart1-rts-cts.dts │ │ ├── uart1.dts │ │ ├── uart2-rts-cts.dts │ │ ├── uart2.dts │ │ ├── uart3-rts-cts.dts │ │ └── uart3.dts │ └── gpio.map ├── aml-a311d-cc-v01 │ ├── dt.config │ ├── dt │ │ ├── cpu-b-opp-2304.dts │ │ ├── cpu-l-opp-2208.dts │ │ ├── npu.dts │ │ └── spifc-nor.dts │ └── gpio.map ├── aml-a311d-cc │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── cpu-b-opp-2304.dts │ │ ├── cpu-l-opp-2208.dts │ │ ├── i2c-2.dts │ │ ├── i2c-ao.dts │ │ ├── npu.dts │ │ ├── spi-cc0-1cs-spidev.dts │ │ ├── spi-cc0-1cs.dts │ │ ├── spi-cc1-1cs-spidev.dts │ │ ├── spi-cc1-1cs.dts │ │ ├── spi-cc1-2cs-ili9486-xpt2046.dts │ │ ├── spi-cc1-2cs-mhs3528.dts │ │ ├── spi-cc1-2cs-mpi3501.dts │ │ ├── spi-cc1-2cs-spidev.dts │ │ ├── spi-cc1-2cs.dts │ │ ├── spifc-nor.dts │ │ ├── uart-ao-b-23.dts │ │ ├── uart-ao-b-89.dts │ │ ├── uart-c-rts-cts.dts │ │ └── uart-c.dts │ └── gpio.map ├── aml-s805x-ac │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── enc28j60-overlay.dts │ │ ├── i2c-a-at24c32.dts │ │ ├── i2c-a-ds3231.dts │ │ ├── i2c-a-ssd1306-128x32.dts │ │ ├── i2c-a-ssd1306-128x64.dts │ │ ├── i2c-a.dts │ │ ├── pitft22-overlay.dts │ │ ├── pps-gpio-7j1-12.dts │ │ ├── pwm-a.dts │ │ ├── pwm-ao-a.dts │ │ ├── pwm-e.dts │ │ ├── pwm-f.dts │ │ ├── rpi-sense.dts │ │ ├── sdio-rtl8822cs.dts │ │ ├── sdio.dts │ │ ├── spi-cc-1cs-enc28j60.dts │ │ ├── spi-cc-1cs-ili9341.dts │ │ ├── spi-cc-1cs-mcp2515-can0.dts │ │ ├── spi-cc-1cs-pitft22.dts │ │ ├── spi-cc-1cs-spidev.dts │ │ ├── spi-cc-1cs-st7789v-240x320-bgr-fbdev.dts │ │ ├── spi-cc-1cs-st7789v-240x320-fbdev.dts │ │ ├── spi-cc-1cs.dts │ │ ├── spi-cc-2cs-ili9486-xpt2046.dts │ │ ├── spi-cc-2cs-mhs3528.dts │ │ ├── spi-cc-2cs-mpi3501.dts │ │ ├── spi-cc-2cs-spidev.dts │ │ ├── spi-cc-2cs.dts │ │ ├── spi-cc-mosi-idle-low.dts │ │ ├── spicc-cs1-ili9486-xpt2046.dts │ │ ├── spicc-cs1.dts │ │ ├── spicc-ili9341.dts │ │ ├── spicc-mcp2515-can0.dts │ │ ├── spicc.dts │ │ ├── spidev-spicc.dts │ │ ├── uart-a-clk81.dts │ │ ├── uart-a-invert-tx.dts │ │ ├── uart-a.dts │ │ ├── uart-b-clk81.dts │ │ ├── uart-b-invert-tx.dts │ │ ├── uart-b.dts │ │ ├── uart-c-clk81.dts │ │ ├── uart-c-cts-rts-clk81.dts │ │ ├── uart-c-cts-rts.dts │ │ ├── uart-c-invert-tx.dts │ │ ├── uart-c.dts │ │ ├── uarta-clk81.dts │ │ ├── uarta.dts │ │ ├── usb-device-mode.dts │ │ └── w1-gpio.dts │ ├── gpio.config │ └── gpio.map ├── aml-s905d3-cc-v01 │ ├── dt.config │ ├── dt │ │ ├── cpu-opp-2208.dts │ │ ├── npu.dts │ │ └── spifc-nor.dts │ └── gpio.map ├── aml-s905d3-cc │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── cpu-opp-2208.dts │ │ ├── i2c-2.dts │ │ ├── i2c-ao.dts │ │ ├── npu.dts │ │ ├── spi-cc0-1cs-spidev.dts │ │ ├── spi-cc0-1cs.dts │ │ ├── spi-cc1-1cs-spidev.dts │ │ ├── spi-cc1-1cs.dts │ │ ├── spi-cc1-2cs-ili9486-xpt2046.dts │ │ ├── spi-cc1-2cs-mhs3528.dts │ │ ├── spi-cc1-2cs-mpi3501.dts │ │ ├── spi-cc1-2cs-spidev.dts │ │ ├── spi-cc1-2cs.dts │ │ ├── spifc-nor.dts │ │ ├── uart-ao-b-23.dts │ │ ├── uart-ao-b-89.dts │ │ ├── uart-c-rts-cts.dts │ │ └── uart-c.dts │ └── gpio.map ├── aml-s905x-cc-v2 │ ├── dt │ ├── dt.config │ ├── dt.map │ ├── gpio.config │ └── gpio.map ├── aml-s905x-cc │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── cvbs-disable.dts │ │ ├── enc28j60-overlay.dts │ │ ├── gpio-key-power-2j3-6.dts │ │ ├── gpio-key-power-7j1-31.dts │ │ ├── gpio-key-power-9j1-2.dts │ │ ├── i2c-ao-at24c32.dts │ │ ├── i2c-ao-ds3231.dts │ │ ├── i2c-ao-pcf8523.dts │ │ ├── i2c-ao-rpi-sense.dts │ │ ├── i2c-ao-rv3028.dts │ │ ├── i2c-ao-ssd1306-128x64.dts │ │ ├── i2c-ao.dts │ │ ├── i2c-b-at24c32.dts │ │ ├── i2c-b-ds3231.dts │ │ ├── i2c-b.dts │ │ ├── pitft22-overlay.dts │ │ ├── pps-gpio-7j1-12.dts │ │ ├── pwm-a-fan-auto.dts │ │ ├── pwm-a-fan.dts │ │ ├── pwm-a.dts │ │ ├── pwm-ao-6.dts │ │ ├── pwm-ao-9.dts │ │ ├── pwm-ao-a-fan.dts │ │ ├── pwm-ao-a.dts │ │ ├── pwm-ao-b-6-fan.dts │ │ ├── pwm-ao-b-6.dts │ │ ├── pwm-ao-b-9-fan.dts │ │ ├── pwm-ao-b-9.dts │ │ ├── pwm-e-fan.dts │ │ ├── pwm-e.dts │ │ ├── pwm-ef.dts │ │ ├── pwm-f-fan.dts │ │ ├── pwm-f.dts │ │ ├── rpi-sense.dts │ │ ├── sd-uhs-sdr104.dts │ │ ├── sdio.dts │ │ ├── spdif.dts │ │ ├── spi-cc-1cs-enc28j60.dts │ │ ├── spi-cc-1cs-ili9341.dts │ │ ├── spi-cc-1cs-ili9486.dts │ │ ├── spi-cc-1cs-mcp2515-can-dual.dts │ │ ├── spi-cc-1cs-mcp2515-can0.dts │ │ ├── spi-cc-1cs-mcp3008.dts │ │ ├── spi-cc-1cs-pitft22.dts │ │ ├── spi-cc-1cs-spidev.dts │ │ ├── spi-cc-1cs-ssd1306-128x64.dts │ │ ├── spi-cc-1cs-st7735r-128x128-fbdev.dts │ │ ├── spi-cc-1cs-st7735r-128x128.dts │ │ ├── spi-cc-1cs-st7789v-240x240.dts │ │ ├── spi-cc-1cs-st7789v-240x320-fbdev.dts │ │ ├── spi-cc-1cs.dts │ │ ├── spi-cc-1cs2-ads7846-irq-22.dts │ │ ├── spi-cc-1cs2.dts │ │ ├── spi-cc-2cs-ili9486-xpt2046.dts │ │ ├── spi-cc-2cs-mhs3528.dts │ │ ├── spi-cc-2cs-mpi3501.dts │ │ ├── spi-cc-2cs-spidev.dts │ │ ├── spi-cc-2cs.dts │ │ ├── spi-cc-cs1.dts │ │ ├── spi-cc-mosi-idle-low.dts │ │ ├── spi-gpio-1cs-ili9486.dts │ │ ├── spi-gpio-1cs-spidev.dts │ │ ├── spi-gpio-1cs.dts │ │ ├── spi-gpio-2cs-ili9486-xpt2046.dts │ │ ├── spi-gpio-2cs-spidev.dts │ │ ├── spi-gpio-2cs.dts │ │ ├── spicc-ce1-ads7846-irq-22.dts │ │ ├── spicc-ce1.dts │ │ ├── spicc-cs1-ili9486-xpt2046.dts │ │ ├── spicc-cs1-mhs3528.dts │ │ ├── spicc-cs1-mpi3501.dts │ │ ├── spicc-cs1-spidev.dts │ │ ├── spicc-cs1.dts │ │ ├── spicc-ili9341.dts │ │ ├── spicc-ili9486.dts │ │ ├── spicc-mcp2515-can0.dts │ │ ├── spicc-mcp2515-dual-can.dts │ │ ├── spicc-mcp3008.dts │ │ ├── spicc-spidev.dts │ │ ├── spicc-ssd1306-128x64.dts │ │ ├── spicc-st7735r-128x128-legacy.dts │ │ ├── spicc-st7735r-128x128.dts │ │ ├── spicc-st7789v-240x240.dts │ │ ├── spicc-st7789v-240x320-legacy.dts │ │ ├── spicc.dts │ │ ├── spigpio-cs1-ili9486-xpt2046.dts │ │ ├── spigpio-cs1-spidev.dts │ │ ├── spigpio-cs1.dts │ │ ├── spigpio-ili9486.dts │ │ ├── spigpio-spidev.dts │ │ ├── spigpio.dts │ │ ├── uart-a-clk81.dts │ │ ├── uart-a-rts-cts-clk81.dts │ │ ├── uart-a-rts-cts.dts │ │ ├── uart-a.dts │ │ ├── uart-ao-b.dts │ │ ├── uarta-clk81.dts │ │ ├── uarta.dts │ │ ├── usb-device-mode.dts │ │ ├── w1-gpio-7j1-7.dts │ │ └── w1-gpio.dts │ ├── gpio.config │ └── gpio.map ├── roc-rk3328-cc-v2 │ ├── dt │ ├── dt.config │ ├── dt.map │ └── gpio.map ├── roc-rk3328-cc │ ├── dt.config │ ├── dt.map │ ├── dt │ │ ├── i2c-0.dts │ │ ├── i2c0.dts │ │ ├── pps-gpio-j1-28.dts │ │ ├── pwm-2-fan.dts │ │ ├── pwm-2.dts │ │ ├── pwm2.dts │ │ ├── saradc.dts │ │ ├── spi-0-1cs-spidev.dts │ │ ├── spi-0-1cs.dts │ │ ├── spi-0-2cs-ili9486-xpt2046.dts │ │ ├── spi-0-2cs-mhs3528.dts │ │ ├── spi-0-2cs-mpi3501.dts │ │ ├── spi-0-2cs-spidev.dts │ │ ├── spi-0-2cs.dts │ │ ├── spi-0.dts │ │ ├── spi0-cs1-ili9486-xpt2046.dts │ │ ├── spi0-cs1-mhs3528.dts │ │ ├── spi0-cs1-mpi3501.dts │ │ ├── spi0-cs1-spidev.dts │ │ ├── spi0-cs1.dts │ │ ├── spi0.dts │ │ ├── uart-1.dts │ │ ├── uart-2.dts │ │ ├── uart1.dts │ │ └── uart2.dts │ └── gpio.map └── roc-rk3399-pc │ ├── dt.config │ └── dt │ └── mezzanine.dts ├── test ├── dt_map_check.sh ├── gpioset.sh └── spi │ ├── bench-freq.sh │ ├── bench-xfer.sh │ ├── bench.c │ ├── bench.sh │ ├── bench_include.sh │ ├── board_include.sh │ └── interactive.sh └── vendor └── aml └── gxl └── gpio_debug /.gitignore: -------------------------------------------------------------------------------- 1 | *.dtbo 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Please see each individual file for its respective license. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DTC ?= dtc 2 | DTC_OPTIONS ?= -@ -q 3 | PREFIX ?= $(DESTDIR)/opt/librecomputer/libretech-wiring-tool 4 | 5 | DESTGPIOMAPS := $(patsubst %,$(PREFIX)/%,$(wildcard libre-computer/*/gpio.map)) 6 | DESTDTMAPS := $(patsubst %,$(PREFIX)/%,$(wildcard libre-computer/*/dt.map)) 7 | DTOS := $(patsubst %.dts,%.dtbo,$(wildcard libre-computer/*/dt/*.dts)) 8 | DESTDTOCFG := $(patsubst %,$(PREFIX)/%,$(wildcard libre-computer/*/dt.config)) 9 | DESTDTBOS := $(patsubst %,$(PREFIX)/%,$(wildcard libre-computer/*/dt/*.dtbo)) 10 | 11 | .PHONY : clean install-lgpio install-ldto install 12 | 13 | all: $(DTOS) 14 | 15 | %.pre.dts: %.dts 16 | @if [ -L $(@D) ]; then \ 17 | exit; \ 18 | fi 19 | @echo "CC $^" 20 | @$(CC) -E -nostdinc -Iinclude -x assembler-with-cpp -undef -o $@ $^ 21 | 22 | %.dtbo: %.pre.dts 23 | @if [ -L $(@D) ]; then \ 24 | exit; \ 25 | fi 26 | @echo "DTC $^" 27 | @$(DTC) $(DTC_OPTIONS) -I dts -O dtb -o $@ $^ 28 | 29 | clean: 30 | rm -f $(DTOS) 31 | 32 | boarddirs: 33 | mkdir -p $(PREFIX) $(patsubst %,$(PREFIX)/%,$(wildcard libre-computer/*)) 34 | 35 | dtodirs: boarddirs 36 | @for dtodir in $(wildcard libre-computer/*/dt); do \ 37 | if [ -L $$dtodir ]; then \ 38 | ln -fns $$(readlink $$dtodir) $(PREFIX)/$$dtodir; \ 39 | else \ 40 | mkdir -p $(PREFIX)/$$dtodir; \ 41 | fi \ 42 | done 43 | 44 | $(PREFIX)/libre-computer/%/gpio.map: boarddirs 45 | @if [ -L $(patsubst $(PREFIX)/%,%,$@) ]; then \ 46 | ln -fns $$(readlink $(patsubst $(PREFIX)/%,%,$@)) $@; \ 47 | else \ 48 | install -p -m 644 $(patsubst $(PREFIX)/%,%,$@) $@; \ 49 | fi 50 | 51 | install-lgpio: boarddirs $(DESTGPIOMAPS) 52 | install -p -m 755 lgpio $(PREFIX) 53 | 54 | $(PREFIX)/libre-computer/%/dt.map: boarddirs 55 | @if [ -L $(patsubst $(PREFIX)/%,%,$@) ]; then \ 56 | ln -fns $$(readlink $(patsubst $(PREFIX)/%,%,$@)) $@; \ 57 | else \ 58 | install -p -m 644 $(patsubst $(PREFIX)/%,%,$@) $@; \ 59 | fi 60 | 61 | $(PREFIX)/libre-computer/%/dt.config: boarddirs 62 | install -p -m 644 $(patsubst $(PREFIX)/%,%,$@) $@ 63 | 64 | $(PREFIX)/libre-computer/%.dtbo: boarddirs dtodirs 65 | @if [ -L $(@D) ]; then \ 66 | exit; \ 67 | else \ 68 | install -p -m 644 $(patsubst $(PREFIX)/%,%,$@) $@; \ 69 | fi 70 | 71 | install-ldto: boarddirs $(DESTDTOCFG) $(DESTDTMAPS) $(DESTDTBOS) 72 | install -p -m 755 ldto $(PREFIX) 73 | 74 | install: install-lgpio install-ldto 75 | 76 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dateymd=$(date +%Y.%m.%d.%H-%M-%S) 4 | commit=$(git rev-parse HEAD) 5 | dateutc=$(date -Ru) 6 | cat < debian/changelog 7 | libretech-wiring-tool ($dateymd) linux; urgency=medium 8 | 9 | * $commit 10 | 11 | -- Da Xue $dateutc 12 | EOF 13 | dpkg-buildpackage -uc --no-sign --build=all 14 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: libretech-wiring-tool 2 | Section: devel 3 | Priority: optional 4 | Maintainer: Da Xue 5 | Build-Depends: build-essential, device-tree-compiler, debhelper (>= 9) 6 | 7 | Package: libretech-gpio 8 | Architecture: all 9 | Depends: gpiod 10 | Description: Libre Computer GPIO tool 11 | 12 | Package: libretech-dtoverlay 13 | Architecture: all 14 | Depends: device-tree-compiler 15 | Description: Libre Computer Device Tree Overlay tool -------------------------------------------------------------------------------- /debian/libretech-dtoverlay.alternatives: -------------------------------------------------------------------------------- 1 | Name: ldto 2 | Link: /usr/bin/ldto 3 | Alternative: /opt/librecomputer/libretech-wiring-tool/ldto 4 | Priority: 50 5 | -------------------------------------------------------------------------------- /debian/libretech-dtoverlay.install: -------------------------------------------------------------------------------- 1 | opt/librecomputer/libretech-wiring-tool/ldto 2 | opt/librecomputer/libretech-wiring-tool/libre-computer/*/dt.config 3 | opt/librecomputer/libretech-wiring-tool/libre-computer/*/dt/*.dtbo -------------------------------------------------------------------------------- /debian/libretech-gpio.alternatives: -------------------------------------------------------------------------------- 1 | Name: lgpio 2 | Link: /usr/bin/lgpio 3 | Alternative: /opt/librecomputer/libretech-wiring-tool/lgpio 4 | Priority: 50 5 | -------------------------------------------------------------------------------- /debian/libretech-gpio.install: -------------------------------------------------------------------------------- 1 | opt/librecomputer/libretech-wiring-tool/lgpio 2 | opt/librecomputer/libretech-wiring-tool/libre-computer/*/gpio.map 3 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | %: 4 | dh $@ -------------------------------------------------------------------------------- /include/dt-bindings/gpio/gpio.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | /* 3 | * This header provides constants for most GPIO bindings. 4 | * 5 | * Most GPIO bindings include a flags cell as part of the GPIO specifier. 6 | * In most cases, the format of the flags cell uses the standard values 7 | * defined in this header. 8 | */ 9 | 10 | #ifndef _DT_BINDINGS_GPIO_GPIO_H 11 | #define _DT_BINDINGS_GPIO_GPIO_H 12 | 13 | /* Bit 0 express polarity */ 14 | #define GPIO_ACTIVE_HIGH 0 15 | #define GPIO_ACTIVE_LOW 1 16 | 17 | /* Bit 1 express single-endedness */ 18 | #define GPIO_PUSH_PULL 0 19 | #define GPIO_SINGLE_ENDED 2 20 | 21 | /* Bit 2 express Open drain or open source */ 22 | #define GPIO_LINE_OPEN_SOURCE 0 23 | #define GPIO_LINE_OPEN_DRAIN 4 24 | 25 | /* 26 | * Open Drain/Collector is the combination of single-ended open drain interface. 27 | * Open Source/Emitter is the combination of single-ended open source interface. 28 | */ 29 | #define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN) 30 | #define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE) 31 | 32 | /* Bit 3 express GPIO suspend/resume and reset persistence */ 33 | #define GPIO_PERSISTENT 0 34 | #define GPIO_TRANSITORY 8 35 | 36 | /* Bit 4 express pull up */ 37 | #define GPIO_PULL_UP 16 38 | 39 | /* Bit 5 express pull down */ 40 | #define GPIO_PULL_DOWN 32 41 | 42 | /* Bit 6 express pull disable */ 43 | #define GPIO_PULL_DISABLE 64 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /include/dt-bindings/interrupt-controller/irq.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2 | /* 3 | * This header provides constants for most IRQ bindings. 4 | * 5 | * Most IRQ bindings include a flags cell as part of the IRQ specifier. 6 | * In most cases, the format of the flags cell uses the standard values 7 | * defined in this header. 8 | */ 9 | 10 | #ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_H 11 | #define _DT_BINDINGS_INTERRUPT_CONTROLLER_IRQ_H 12 | 13 | #define IRQ_TYPE_NONE 0 14 | #define IRQ_TYPE_EDGE_RISING 1 15 | #define IRQ_TYPE_EDGE_FALLING 2 16 | #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) 17 | #define IRQ_TYPE_LEVEL_HIGH 4 18 | #define IRQ_TYPE_LEVEL_LOW 8 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/dt-bindings/pinctrl/rockchip.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 | /* 3 | * Header providing constants for Rockchip pinctrl bindings. 4 | * 5 | * Copyright (c) 2013 MundoReader S.L. 6 | * Author: Heiko Stuebner 7 | */ 8 | 9 | #ifndef __DT_BINDINGS_ROCKCHIP_PINCTRL_H__ 10 | #define __DT_BINDINGS_ROCKCHIP_PINCTRL_H__ 11 | 12 | #define RK_PA0 0 13 | #define RK_PA1 1 14 | #define RK_PA2 2 15 | #define RK_PA3 3 16 | #define RK_PA4 4 17 | #define RK_PA5 5 18 | #define RK_PA6 6 19 | #define RK_PA7 7 20 | #define RK_PB0 8 21 | #define RK_PB1 9 22 | #define RK_PB2 10 23 | #define RK_PB3 11 24 | #define RK_PB4 12 25 | #define RK_PB5 13 26 | #define RK_PB6 14 27 | #define RK_PB7 15 28 | #define RK_PC0 16 29 | #define RK_PC1 17 30 | #define RK_PC2 18 31 | #define RK_PC3 19 32 | #define RK_PC4 20 33 | #define RK_PC5 21 34 | #define RK_PC6 22 35 | #define RK_PC7 23 36 | #define RK_PD0 24 37 | #define RK_PD1 25 38 | #define RK_PD2 26 39 | #define RK_PD3 27 40 | #define RK_PD4 28 41 | #define RK_PD5 29 42 | #define RK_PD6 30 43 | #define RK_PD7 31 44 | 45 | #define RK_FUNC_GPIO 0 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | /* 3 | * Copyright (c) 2019 BayLibre, SAS. 4 | * Author: Jerome Brunet 5 | * 6 | */ 7 | 8 | #ifndef _DT_BINDINGS_AMLOGIC_MESON_G12A_AUDIO_RESET_H 9 | #define _DT_BINDINGS_AMLOGIC_MESON_G12A_AUDIO_RESET_H 10 | 11 | #define AUD_RESET_PDM 0 12 | #define AUD_RESET_TDMIN_A 1 13 | #define AUD_RESET_TDMIN_B 2 14 | #define AUD_RESET_TDMIN_C 3 15 | #define AUD_RESET_TDMIN_LB 4 16 | #define AUD_RESET_LOOPBACK 5 17 | #define AUD_RESET_TODDR_A 6 18 | #define AUD_RESET_TODDR_B 7 19 | #define AUD_RESET_TODDR_C 8 20 | #define AUD_RESET_FRDDR_A 9 21 | #define AUD_RESET_FRDDR_B 10 22 | #define AUD_RESET_FRDDR_C 11 23 | #define AUD_RESET_TDMOUT_A 12 24 | #define AUD_RESET_TDMOUT_B 13 25 | #define AUD_RESET_TDMOUT_C 14 26 | #define AUD_RESET_SPDIFOUT 15 27 | #define AUD_RESET_SPDIFOUT_B 16 28 | #define AUD_RESET_SPDIFIN 17 29 | #define AUD_RESET_EQDRC 18 30 | #define AUD_RESET_RESAMPLE 19 31 | #define AUD_RESET_DDRARB 20 32 | #define AUD_RESET_POWDET 21 33 | #define AUD_RESET_TORAM 22 34 | #define AUD_RESET_TOACODEC 23 35 | #define AUD_RESET_TOHDMITX 24 36 | #define AUD_RESET_CLKTREE 25 37 | 38 | /* SM1 added resets */ 39 | #define AUD_RESET_RESAMPLE_B 26 40 | #define AUD_RESET_TOVAD 27 41 | #define AUD_RESET_LOCKER 28 42 | #define AUD_RESET_SPDIFIN_LB 29 43 | #define AUD_RESET_FRATV 30 44 | #define AUD_RESET_FRHDMIRX 31 45 | #define AUD_RESET_FRDDR_D 32 46 | #define AUD_RESET_TODDR_D 33 47 | #define AUD_RESET_LOOPBACK_B 34 48 | #define AUD_RESET_EARCTX 35 49 | #define AUD_RESET_EARCRX 36 50 | #define AUD_RESET_FRDDR_E 37 51 | #define AUD_RESET_TODDR_E 38 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /include/dt-bindings/sound/meson-aiu.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | #ifndef __DT_MESON_AIU_H 3 | #define __DT_MESON_AIU_H 4 | 5 | #define AIU_CPU 0 6 | #define AIU_HDMI 1 7 | #define AIU_ACODEC 2 8 | 9 | #define CPU_I2S_FIFO 0 10 | #define CPU_SPDIF_FIFO 1 11 | #define CPU_I2S_ENCODER 2 12 | #define CPU_SPDIF_ENCODER 3 13 | 14 | #define CTRL_I2S 0 15 | #define CTRL_PCM 1 16 | #define CTRL_OUT 2 17 | 18 | #endif /* __DT_MESON_AIU_H */ 19 | -------------------------------------------------------------------------------- /include/dt-bindings/sound/meson-g12a-toacodec.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | #ifndef __DT_MESON_G12A_TOACODEC_H 3 | #define __DT_MESON_G12A_TOACODEC_H 4 | 5 | #define TOACODEC_IN_A 0 6 | #define TOACODEC_IN_B 1 7 | #define TOACODEC_IN_C 2 8 | #define TOACODEC_OUT 3 9 | 10 | #endif /* __DT_MESON_G12A_TOACODEC_H */ 11 | -------------------------------------------------------------------------------- /include/dt-bindings/sound/meson-g12a-tohdmitx.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 */ 2 | #ifndef __DT_MESON_G12A_TOHDMITX_H 3 | #define __DT_MESON_G12A_TOHDMITX_H 4 | 5 | #define TOHDMITX_I2S_IN_A 0 6 | #define TOHDMITX_I2S_IN_B 1 7 | #define TOHDMITX_I2S_IN_C 2 8 | #define TOHDMITX_I2S_OUT 3 9 | #define TOHDMITX_SPDIF_IN_A 4 10 | #define TOHDMITX_SPDIF_IN_B 5 11 | #define TOHDMITX_SPDIF_OUT 6 12 | 13 | #endif /* __DT_MESON_G12A_TOHDMITX_H */ 14 | -------------------------------------------------------------------------------- /include/dt-bindings/thermal/thermal.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0-only */ 2 | /* 3 | * This header provides constants for most thermal bindings. 4 | * 5 | * Copyright (C) 2013 Texas Instruments 6 | * Eduardo Valentin 7 | */ 8 | 9 | #ifndef _DT_BINDINGS_THERMAL_THERMAL_H 10 | #define _DT_BINDINGS_THERMAL_THERMAL_H 11 | 12 | /* On cooling devices upper and lower limits */ 13 | #define THERMAL_NO_LIMIT (~0) 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /include/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; then 4 | echo "$0 LINUX_DIR" 5 | return 1 6 | fi 7 | 8 | for i in $(find dt-bindings -iname "*.h"); do 9 | echo $i 10 | if [ -f "$1/include/$i" ]; then 11 | cp "$1/include/$i" $i 12 | else 13 | echo "$i not found..." 14 | fi 15 | done 16 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd $(dirname $(readlink -f "${BASH_SOURCE[0]}")) 6 | 7 | update-alternatives --install /usr/local/bin/lgpio lgpio $PWD/lgpio 40 8 | update-alternatives --install /usr/local/bin/ldto ldtbo $PWD/ldto 40 9 | 10 | packages=() 11 | 12 | if ! which dtc > /dev/null; then 13 | packages+=(device-tree-compiler) 14 | fi 15 | 16 | if ! which gpioget > /dev/null; then 17 | packages+=(gpiod) 18 | fi 19 | 20 | if ! which make > /dev/null; then 21 | packages+=(make) 22 | fi 23 | 24 | if ! which gcc > /dev/null; then 25 | packages+=(gcc) 26 | fi 27 | 28 | if [ "${#packages[@]}" -gt 0 ]; then 29 | apt install -y ${packages[@]} 30 | fi 31 | 32 | make -j`nproc` 33 | 34 | echo "Libre Computer Wiring Tool installed!" 35 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h3/dt: -------------------------------------------------------------------------------- 1 | ../all-h3-cc-h5/dt -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h3/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=sun8i-h3-libretech-all-h3-cc.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h3/dt.map: -------------------------------------------------------------------------------- 1 | ../all-h3-cc-h5/dt.map -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h3/gpio.map: -------------------------------------------------------------------------------- 1 | ../all-h3-cc-h5/gpio.map -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=allwinner/sun50i-h5-libretech-all-h3-cc.dtb -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt.map: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2021 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | # I2C 4 | H40P_I2C_0 i2c-0 5 | H40P_I2C_0_SSD1306_128x32 i2c-0-ssd1306-128x32 6 | H40P_I2C_0_SSD1306_128x64 i2c-0-ssd1306-128x64 7 | H40P_I2C_1 i2c-1 8 | H40P_I2C_1_SSD1306_128x32 i2c-1-ssd1306-128x32 9 | H40P_I2C_1_SSD1306_128x64 i2c-1-ssd1306-128x64 10 | # SPI 11 | H40P_SPI_0_1CS spi-0-1cs 12 | H40P_SPI_0_1CS_DEV spi-0-1cs-spidev 13 | H40P_SPI_0_2CS spi-0-2cs 14 | H40P_SPI_0_2CS_DEV spi-0-2cs-spidev 15 | H40P_SPI_0_2CS_LCD_35 spi-0-2cs-ili9486-xpt2046 16 | H40P_SPI_0_2CS_LCD_35_MPI3501 spi-0-2cs-mpi3501 17 | H40P_SPI_0_2CS_LCD_35_MHS3528 spi-0-2cs-mhs3528 18 | H40P_SPI_1_1CS spi-1-1cs 19 | H40P_SPI_1_1CS_DEV spi-1-1cs-spidev 20 | # UART 21 | H40P_UART_0 uart-1 22 | # PWM 23 | # CSI 24 | CSI_0_I2C i2c-2 25 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c-0.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 3 SDA 9 | * Pin 5 SCL 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target-path = "/aliases"; 20 | __overlay__ { 21 | i2c0 = "/soc/i2c@01c2ac00"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&i2c0>; 27 | __overlay__ { 28 | status = "okay"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c-1.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 27 SDA 9 | * Pin 28 SCL 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target-path = "/aliases"; 20 | __overlay__ { 21 | i2c1 = "/soc/i2c@01c2b000"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&i2c1>; 27 | __overlay__ { 28 | status = "okay"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c-2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* DVP 8 | * PE12 SCL 9 | * PE13 SDA 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target-path = "/aliases"; 20 | __overlay__ { 21 | i2c2 = "/soc/i2c@01c2b400"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&i2c2>; 27 | __overlay__ { 28 | status = "okay"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c0-twi0.dts: -------------------------------------------------------------------------------- 1 | i2c-0.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c1-twi1.dts: -------------------------------------------------------------------------------- 1 | i2c-1.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/i2c2-camera.dts: -------------------------------------------------------------------------------- 1 | i2c-2.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/pwm-0.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 3P UART 8 | * Pin 3 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 16 | 17 | fragment@0 { 18 | target-path = "/chosen"; 19 | __overlay__ { 20 | /delete-property/ stdout-path; 21 | }; 22 | }; 23 | 24 | fragment@1 { 25 | target = <&uart0>; 26 | __overlay__ { 27 | status = "disabled"; 28 | }; 29 | }; 30 | 31 | fragment@2 { 32 | target = <&pio>; 33 | __overlay__ { 34 | pwm0_pin: pwm0 { 35 | pins = "PA5"; 36 | function = "pwm0"; 37 | }; 38 | }; 39 | }; 40 | 41 | fragment@3 { 42 | target = <&pwm>; 43 | __overlay__ { 44 | pinctrl-names = "default"; 45 | pinctrl-0 = <&pwm0_pin>; 46 | status = "okay"; 47 | }; 48 | }; 49 | }; 50 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/pwm-disable-uart.dts: -------------------------------------------------------------------------------- 1 | pwm-0.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spdif.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 26 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 16 | 17 | fragment@0 { 18 | target = <&spdif>; 19 | __overlay__ { 20 | pinctrl-names = "default"; 21 | pinctrl-0 = <&spdif_tx_pins_a>; 22 | status = "okay"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target-path = "/"; 28 | __overlay__ { 29 | sound { 30 | compatible = "simple-audio-card"; 31 | simple-audio-card,name = "On-board SPDIF"; 32 | 33 | simple-audio-card,cpu { 34 | sound-dai = <&spdif>; 35 | }; 36 | 37 | simple-audio-card,codec { 38 | sound-dai = <&spdif_out>; 39 | }; 40 | }; 41 | 42 | spdif_out: spdif-out { 43 | #sound-dai-cells = <0>; 44 | compatible = "linux,spdif-dit"; 45 | }; 46 | }; 47 | }; 48 | }; 49 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 12 | 13 | fragment@0 { 14 | target = <&spi0>; 15 | 16 | __overlay__ { 17 | #address-cells = <1>; 18 | #size-cells = <0>; 19 | spidev@0 { 20 | compatible = "rohm,dh2228fv"; 21 | reg = <0>; 22 | spi-max-frequency = <30000000>; 23 | }; 24 | }; 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 19 MOSI 9 | * Pin 21 MISO 10 | * Pin 23 CLK 11 | * Pin 24 CE0 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | __overlay__ { 23 | spi0 = "/soc/spi@01c68000"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&spi0>; 29 | __overlay__ { 30 | pinctrl-names = "default"; 31 | status = "okay"; 32 | cs-gpios = <0>; 33 | }; 34 | }; 35 | }; 36 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables ILI9486 based 3.5" touchscreen on 40P header 7J1 without tuning parameters 9 | * Requires spi0-cs1 overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | __overlay__ { 24 | spi0 = "/soc/spi@01c68000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pio>; 30 | __overlay__ { 31 | ads7846_pins: ads7846_pins { 32 | pins = "PA1"; 33 | function = "irq"; 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | display@0 { 45 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 46 | reg = <0>; 47 | spi-max-frequency = <20000000>; 48 | reset-gpios = <&pio 0 14 GPIO_ACTIVE_HIGH>; 49 | dc-gpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; 50 | status = "okay"; 51 | }; 52 | 53 | touchscreen@1 { 54 | compatible = "ti,ads7846"; 55 | reg = <1>; 56 | pinctrl-names = "default"; 57 | pinctrl-0 = <&ads7846_pins>; 58 | spi-max-frequency = <2000000>; 59 | interrupt-parent = <&pio>; 60 | interrupts = <0 1 IRQ_TYPE_EDGE_FALLING>; 61 | pendown-gpio = <&pio 0 1 GPIO_ACTIVE_LOW>; 62 | ti,x-plate-ohms = /bits/ 16 <60>; 63 | ti,pressure-max = /bits/ 16 <255>; 64 | wakeup-source; 65 | status = "okay"; 66 | }; 67 | }; 68 | }; 69 | }; 70 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables ILI9486 based 3.5" touchscreen on 40P header 7J1 without tuning parameters 9 | * Requires spi0-cs1 overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | __overlay__ { 24 | spi0 = "/soc/spi@01c68000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pio>; 30 | __overlay__ { 31 | ads7846_pins: ads7846_pins { 32 | pins = "PA1"; 33 | function = "irq"; 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | display@0 { 45 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 46 | reg = <0>; 47 | spi-max-frequency = <41666666>; 48 | reset-gpios = <&pio 0 14 GPIO_ACTIVE_HIGH>; 49 | dc-gpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; 50 | status = "okay"; 51 | }; 52 | 53 | touchscreen@1 { 54 | compatible = "ti,ads7846"; 55 | reg = <1>; 56 | pinctrl-names = "default"; 57 | pinctrl-0 = <&ads7846_pins>; 58 | spi-max-frequency = <1302084>; 59 | interrupt-parent = <&pio>; 60 | interrupts = <0 1 IRQ_TYPE_EDGE_FALLING>; 61 | pendown-gpio = <&pio 0 1 GPIO_ACTIVE_LOW>; 62 | ti,x-plate-ohms = /bits/ 16 <60>; 63 | ti,pressure-max = /bits/ 16 <255>; 64 | touchscreen-swapped-x-y; 65 | touchscreen-inverted-x; 66 | touchscreen-min-x = <180>; 67 | touchscreen-size-x = <3880>; 68 | touchscreen-min-y = <240>; 69 | touchscreen-size-y = <3940>; 70 | wakeup-source; 71 | status = "okay"; 72 | }; 73 | }; 74 | }; 75 | }; 76 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables ILI9486 based 3.5" touchscreen on 40P header 7J1 without tuning parameters 9 | * Requires spi0-cs1 overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | __overlay__ { 24 | spi0 = "/soc/spi@01c68000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pio>; 30 | __overlay__ { 31 | ads7846_pins: ads7846_pins { 32 | pins = "PA1"; 33 | function = "irq"; 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&spi0>; 40 | __overlay__ { 41 | #address-cells = <1>; 42 | #size-cells = <0>; 43 | 44 | display@0 { 45 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 46 | reg = <0>; 47 | spi-max-frequency = <20000000>; 48 | reset-gpios = <&pio 0 14 GPIO_ACTIVE_HIGH>; 49 | dc-gpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; 50 | status = "okay"; 51 | }; 52 | 53 | touchscreen@1 { 54 | compatible = "ti,ads7846"; 55 | reg = <1>; 56 | pinctrl-names = "default"; 57 | pinctrl-0 = <&ads7846_pins>; 58 | spi-max-frequency = <2000000>; 59 | interrupt-parent = <&pio>; 60 | interrupts = <0 1 IRQ_TYPE_EDGE_FALLING>; 61 | pendown-gpio = <&pio 0 1 GPIO_ACTIVE_LOW>; 62 | ti,x-plate-ohms = /bits/ 16 <60>; 63 | ti,pressure-max = /bits/ 16 <255>; 64 | touchscreen-swapped-x-y; 65 | touchscreen-inverted-x; 66 | touchscreen-min-x = <300>; 67 | touchscreen-size-x = <3850>; 68 | touchscreen-min-y = <240>; 69 | touchscreen-size-y = <3900>; 70 | wakeup-source; 71 | status = "okay"; 72 | }; 73 | }; 74 | }; 75 | }; 76 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "allwinner,sun50i-h5"; 12 | 13 | fragment@0 { 14 | target = <&spi0>; 15 | __overlay__ { 16 | #address-cells = <1>; 17 | #size-cells = <0>; 18 | spidev@0 { 19 | compatible = "spidev", "rohm,dh2228fv"; 20 | reg = <0>; 21 | spi-max-frequency = <30000000>; 22 | }; 23 | spidev@1 { 24 | compatible = "spidev", "rohm,dh2228fv"; 25 | reg = <1>; 26 | spi-max-frequency = <30000000>; 27 | }; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-0-2cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 19 MOSI 9 | * Pin 21 MISO 10 | * Pin 23 CLK 11 | * Pin 24 CE0 12 | * Pin 26 CE1 13 | */ 14 | 15 | /dts-v1/; 16 | /plugin/; 17 | 18 | #include 19 | 20 | / { 21 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 22 | 23 | fragment@0 { 24 | target-path = "/aliases"; 25 | __overlay__ { 26 | spi0 = "/soc/spi@01c68000"; 27 | }; 28 | }; 29 | 30 | fragment@1 { 31 | target = <&pio>; 32 | __overlay__ { 33 | spi0_cs1: spi0_cs1 { 34 | pins = "PA17"; 35 | function = "gpio_out"; 36 | output-high; 37 | }; 38 | }; 39 | }; 40 | 41 | fragment@2 { 42 | target = <&spi0>; 43 | __overlay__ { 44 | status = "okay"; 45 | pinctrl-names = "default", "default"; 46 | pinctrl-1 = <&spi0_cs1>; 47 | cs-gpios = <0>, <&pio 0 17 GPIO_ACTIVE_LOW>; 48 | }; 49 | }; 50 | }; 51 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-1-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | 4 | / { 5 | compatible = "allwinner,sun50i-h5"; 6 | 7 | fragment@0 { 8 | target = <&spi1>; 9 | __overlay__ { 10 | #address-cells = <1>; 11 | #size-cells = <0>; 12 | spidev { 13 | compatible = "spidev", "rohm,dh2228fv"; 14 | reg = <0>; 15 | spi-max-frequency = <30000000>; 16 | }; 17 | }; 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi-1-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 22 CLK 9 | * Pin 32 CE0 10 | * Pin 37 MISO 11 | * Pin 36 MOSI 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | __overlay__ { 23 | spi1 = "/soc/spi@01c69000"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&spi1>; 29 | __overlay__ { 30 | pinctrl-names = "default"; 31 | status = "okay"; 32 | cs-gpios = <0>; 33 | }; 34 | }; 35 | }; 36 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi0-cs1-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi0-cs1-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi0-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi0-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-0-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi0.dts: -------------------------------------------------------------------------------- 1 | spi-0-1cs.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi1-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-1-1cs.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/spi1-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-1-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-1-rts-cts.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 8 TX 9 | * Pin 10 RX 10 | * Pin 16 CTS 11 | * Pin 18 RTS 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 19 | 20 | fragment@0 { 21 | target = <&uart1>; 22 | 23 | __overlay__ { 24 | pinctrl-names = "default"; 25 | pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 26 | uart-has-rtscts; 27 | status = "okay"; 28 | }; 29 | }; 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-1.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 8 TX 9 | * Pin 10 RX 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target = <&uart1>; 20 | 21 | __overlay__ { 22 | pinctrl-names = "default"; 23 | pinctrl-0 = <&uart1_pins>; 24 | status = "okay"; 25 | }; 26 | }; 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-2-rts-cts.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 7 RTS 9 | * Pin 11 RX 10 | * Pin 13 TX 11 | * Pin 15 CTS 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 19 | 20 | fragment@0 { 21 | target = <&uart2>; 22 | 23 | __overlay__ { 24 | pinctrl-names = "default"; 25 | pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>; 26 | uart-has-rtscts; 27 | status = "okay"; 28 | }; 29 | }; 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 11 RX 9 | * Pin 13 TX 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target = <&uart2>; 20 | 21 | __overlay__ { 22 | pinctrl-names = "default"; 23 | pinctrl-0 = <&uart2_pins>; 24 | status = "okay"; 25 | }; 26 | }; 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-3-rts-cts.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 22 RX 9 | * Pin 32 TX 10 | * Pin 36 RTS 11 | * Pin 37 CTS 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 19 | 20 | fragment@0 { 21 | target = <&uart3>; 22 | 23 | __overlay__ { 24 | pinctrl-names = "default"; 25 | pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>; 26 | uart-has-rtscts; 27 | status = "okay"; 28 | }; 29 | }; 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart-3.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 40P GPIO 8 | * Pin 22 RX 9 | * Pin 32 TX 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,all-h3-cc-h5", "libretech,all-h3-cc-h3", "allwinner,sun50i-h5", "allwinner,sun8i-h3"; 17 | 18 | fragment@0 { 19 | target = <&uart3>; 20 | 21 | __overlay__ { 22 | pinctrl-names = "default"; 23 | pinctrl-0 = <&uart3_pins>; 24 | status = "okay"; 25 | }; 26 | }; 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart1-rts-cts.dts: -------------------------------------------------------------------------------- 1 | uart-1-rts-cts.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart1.dts: -------------------------------------------------------------------------------- 1 | uart-1.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart2-rts-cts.dts: -------------------------------------------------------------------------------- 1 | uart-2-rts-cts.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart2.dts: -------------------------------------------------------------------------------- 1 | uart-2.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart3-rts-cts.dts: -------------------------------------------------------------------------------- 1 | uart-3-rts-cts.dts -------------------------------------------------------------------------------- /libre-computer/all-h3-cc-h5/dt/uart3.dts: -------------------------------------------------------------------------------- 1 | uart-3.dts -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc-v01/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-g12b-a311d-libretech-cc-v01.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc-v01/dt/cpu-b-opp-2304.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/cpu-b-opp-2304.dts -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc-v01/dt/cpu-l-opp-2208.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/cpu-l-opp-2208.dts -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc-v01/dt/npu.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/npu.dts -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc-v01/dt/spifc-nor.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spifc-nor.dts -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-g12b-a311d-libretech-cc.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt.map: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | # I2C 4 | H40P_I2C_0 i2c-ao 5 | H40P_I2C_1 i2c-2 6 | # SPI 7 | H40P_SPI_0_1CS spi-cc1-1cs 8 | H40P_SPI_0_1CS_DEV spi-cc1-1cs-spidev 9 | H40P_SPI_0_2CS spi-cc1-2cs 10 | H40P_SPI_0_2CS_DEV spi-cc1-2cs-spidev 11 | H40P_SPI_0_2CS_LCD_35 spi-cc1-2cs-mpi3501 12 | H40P_SPI_0_2CS_LCD_35_MPI3501 spi-cc1-2cs-mpi3501 13 | H40P_SPI_0_2CS_LCD_35_MHS3528 spi-cc1-2cs-mhs3528 14 | H40P_SPI_1_1CS spi-cc0-1cs 15 | H40P_SPI_1_1CS_DEV spi-cc0-1cs-spidev 16 | # UART 17 | H40P_UART_0 uart-ao-b-89 18 | H40P_UART_P5_P3 uart-ao-b-23 19 | # PWM 20 | H40P_PWM_P7 pwm-ao-c 21 | H40P_PWM_P16 pwm-d 22 | H40P_PWM_P21 pwm-f-h5 23 | H40P_PWM_P23 pwm-b 24 | H40P_PWM_P32 pwm-f-a11 25 | H40P_PWM_P33 pwm-c-x5 26 | H40P_PWM_P35 pwm-c-x8 27 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/cpu-b-opp-2304.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-a311d-cc"; 12 | 13 | fragment@0 { 14 | target = <&cpub_opp_table_1>; 15 | 16 | __overlay__ { 17 | opp-2304000000 { 18 | opp-hz = /bits/ 64 <2304000000>; 19 | opp-microvolt = <1011000>; 20 | }; 21 | }; 22 | }; 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/cpu-l-opp-2208.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-a311d-cc"; 12 | 13 | fragment@0 { 14 | target = <&cpu_opp_table_0>; 15 | 16 | __overlay__ { 17 | opp-2208000000 { 18 | opp-hz = /bits/ 64 <2208000000>; 19 | opp-microvolt = <1011000>; 20 | }; 21 | }; 22 | }; 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/i2c-2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Luke Lu 5 | */ 6 | 7 | /* enable 40 Header J72 - Pin 27 (SDA), 28 (SCL) */ 8 | 9 | /dts-v1/; 10 | /plugin/; 11 | 12 | / { 13 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 14 | 15 | fragment@0 { 16 | target = <&i2c2>; 17 | 18 | __overlay__ { 19 | status = "okay"; 20 | pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>; 21 | pinctrl-names = "default"; 22 | }; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/i2c-ao.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Luke Lu 5 | */ 6 | 7 | /* enable 40 Header J72 - Pin 3 (SDA), 5 (SCL) */ 8 | 9 | /dts-v1/; 10 | /plugin/; 11 | 12 | / { 13 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 14 | 15 | fragment@0 { 16 | target = <&i2c_AO>; 17 | 18 | __overlay__ { 19 | status = "okay"; 20 | pinctrl-0 = <&i2c_ao_sda_pins>, <&i2c_ao_sck_pins>; 21 | pinctrl-names = "default"; 22 | }; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/npu.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-a311d-cc"; 12 | 13 | fragment@0 { 14 | target = <&npu>; 15 | 16 | __overlay__ { 17 | status = "okay"; 18 | }; 19 | }; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc0-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC0 userspace spidev for spi-cc0-1cs 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target = <&spicc0>; 22 | 23 | __overlay__ { 24 | spidev@0 { 25 | compatible = "rohm,dh2228fv"; 26 | reg = <0>; 27 | spi-max-frequency = <166666664>; 28 | }; 29 | }; 30 | }; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc0-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC0 on Header 7J2 on pins 38 (MOSI), 40 (MISO), 12 (SCLK), and 35 (SS0) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | spi2 = "/soc/bus@ffd00000/spi@13000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spicc0>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&spicc0_x_pins>, <&spicc0_ss0_x_pins>; 34 | pinctrl-names = "default", "default"; 35 | 36 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; 37 | }; 38 | }; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC1 userspace spidev for spi-cc1-1cs 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target = <&spicc1>; 22 | 23 | __overlay__ { 24 | spidev@0 { 25 | compatible = "rohm,dh2228fv"; 26 | reg = <0>; 27 | spi-max-frequency = <166666664>; 28 | }; 29 | }; 30 | }; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC1 on Header 7J2 on pins 19 (MOSI), 21 (MISO), 23 (SCLK), and 24 (SS0) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | spi1 = "/soc/bus@ffd00000/spi@15000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spicc1>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&spicc1_pins>, <&spicc1_ss0_pins>; 34 | pinctrl-names = "default", "default"; 35 | 36 | cs-gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>; 37 | }; 38 | }; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 17 | 18 | fragment@0 { 19 | target = <&spicc1>; 20 | 21 | __overlay__ { 22 | 23 | display@0 { 24 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 25 | reg = <0>; 26 | spi-max-frequency = <40000000>; 27 | reset-gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>; 28 | dc-gpios = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>; 29 | status = "okay"; 30 | }; 31 | 32 | touchscreen@1 { 33 | compatible = "ti,ads7846"; 34 | reg = <1>; 35 | spi-max-frequency = <2000000>; 36 | interrupt-parent = <&gpio_intc>; 37 | interrupts = ; 38 | pendown-gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>; 39 | ti,x-plate-ohms = /bits/ 16 <60>; 40 | ti,pressure-max = /bits/ 16 <255>; 41 | wakeup-source; 42 | status = "okay"; 43 | }; 44 | }; 45 | }; 46 | }; 47 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 17 | 18 | fragment@0 { 19 | target = <&spicc1>; 20 | 21 | __overlay__ { 22 | 23 | display@0 { 24 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 25 | reg = <0>; 26 | spi-max-frequency = <166666664>; 27 | reset-gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>; 28 | dc-gpios = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>; 29 | status = "okay"; 30 | }; 31 | 32 | touchscreen@1 { 33 | compatible = "ti,ads7846"; 34 | reg = <1>; 35 | spi-max-frequency = <2000000>; 36 | interrupt-parent = <&gpio_intc>; 37 | interrupts = ; 38 | pendown-gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>; 39 | ti,x-plate-ohms = /bits/ 16 <60>; 40 | ti,pressure-max = /bits/ 16 <255>; 41 | touchscreen-swapped-x-y; 42 | touchscreen-inverted-x; 43 | touchscreen-min-x = <180>; 44 | touchscreen-size-x = <3880>; 45 | touchscreen-min-y = <240>; 46 | touchscreen-size-y = <3940>; 47 | wakeup-source; 48 | status = "okay"; 49 | }; 50 | }; 51 | }; 52 | }; 53 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 17 | 18 | fragment@0 { 19 | target = <&spicc1>; 20 | 21 | __overlay__ { 22 | 23 | display@0 { 24 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 25 | reg = <0>; 26 | spi-max-frequency = <32000000>; 27 | reset-gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>; 28 | dc-gpios = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>; 29 | status = "okay"; 30 | }; 31 | 32 | touchscreen@1 { 33 | compatible = "ti,ads7846"; 34 | reg = <1>; 35 | spi-max-frequency = <2000000>; 36 | interrupt-parent = <&gpio_intc>; 37 | interrupts = ; 38 | pendown-gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>; 39 | ti,x-plate-ohms = /bits/ 16 <60>; 40 | ti,pressure-max = /bits/ 16 <255>; 41 | touchscreen-swapped-x-y; 42 | touchscreen-inverted-x; 43 | touchscreen-min-x = <300>; 44 | touchscreen-size-x = <3850>; 45 | touchscreen-min-y = <240>; 46 | touchscreen-size-y = <3900>; 47 | wakeup-source; 48 | status = "okay"; 49 | }; 50 | }; 51 | }; 52 | }; 53 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC1 userspace spidev for spi-cc1-1cs 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target = <&spicc1>; 22 | 23 | __overlay__ { 24 | spidev@0 { 25 | compatible = "rohm,dh2228fv"; 26 | reg = <0>; 27 | spi-max-frequency = <166666664>; 28 | }; 29 | spidev@1 { 30 | compatible = "rohm,dh2228fv"; 31 | reg = <1>; 32 | spi-max-frequency = <166666664>; 33 | }; 34 | }; 35 | }; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spi-cc1-2cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC1 on Header 7J2 on pins 19 (MOSI), 21 (MISO), 23 (SCLK), and 24 (SS0) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | spi1 = "/soc/bus@ffd00000/spi@15000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spicc1>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&spicc1_pins>, <&spicc1_ss0_pins>; 34 | pinctrl-names = "default", "default"; 35 | 36 | cs-gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>, <&gpio GPIOA_9 GPIO_ACTIVE_LOW>; 37 | }; 38 | }; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/spifc-nor.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-a311d-cc"; 12 | 13 | fragment@0 { 14 | target = <&sd_emmc_c>; 15 | 16 | __overlay__ { 17 | pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>; 18 | bus-width = <4>; 19 | }; 20 | }; 21 | 22 | fragment@1 { 23 | target = <&spifc>; 24 | 25 | __overlay__ { 26 | status = "okay"; 27 | }; 28 | }; 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/uart-ao-b-23.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_AO_B 40 Header 7J2 pins 5 (TX) and 3 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 16 | 17 | fragment@0 { 18 | target = <&uart_AO_B>; 19 | 20 | __overlay__ { 21 | status = "okay"; 22 | pinctrl-0 = <&uart_ao_b_2_3_pins>; 23 | pinctrl-names = "default"; 24 | }; 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/uart-ao-b-89.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_AO_B 40 Header 7J2 pins 8 (TX) and 10 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 16 | 17 | fragment@0 { 18 | target = <&uart_AO_B>; 19 | 20 | __overlay__ { 21 | status = "okay"; 22 | pinctrl-0 = <&uart_ao_b_8_9_pins>; 23 | pinctrl-names = "default"; 24 | }; 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/uart-c-rts-cts.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C 40 Header 7J2 pins 23 (TX), 24 (RX), 19 (RTS), and 21 (CTS) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 16 | 17 | fragment@0 { 18 | target = <&uart_C>; 19 | 20 | __overlay__ { 21 | status = "okay"; 22 | pinctrl-0 = <&uart_c_pins>, <&uart_c_cts_rts_pins>; 23 | pinctrl-names = "default"; 24 | uart-has-rtscts; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /libre-computer/aml-a311d-cc/dt/uart-c.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (C) 2024 Libre Computer, Inc. 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C 40 Header 7J2 pins 23 (TX) and 24 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-a311d-cc", "amlogic,a311d", "amlogic,g12b", "libretech,aml-s905d3-cc", "amlogic,s905d3", "amlogic,sm1"; 16 | 17 | fragment@0 { 18 | target = <&uart_C>; 19 | 20 | __overlay__ { 21 | status = "okay"; 22 | pinctrl-0 = <&uart_c_pins>; 23 | pinctrl-names = "default"; 24 | }; 25 | }; 26 | }; 27 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-gxl-s805x-libretech-ac.dtb -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt.map: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | # I2C 4 | H40P_I2C_0 i2c-gpio-p5p3 5 | H40P_I2C_0_SSD1306_128x32 i2c-gpio-p5p3-ssd1306-128x32 6 | H40P_I2C_0_SSD1306_128x64 i2c-gpio-p5p3-ssd1306-128x64 7 | H40P_I2C_1 i2c-a 8 | H40P_I2C_1_SSD1306_128x32 i2c-a-ssd1306-128x32 9 | H40P_I2C_1_SSD1306_128x64 i2c-a-ssd1306-128x64 10 | H40P_I2C_P23_P24 i2c-d 11 | # SPI 12 | H40P_SPI_0_1CS spi-cc-1cs 13 | H40P_SPI_0_1CS_DEV spi-cc-1cs-spidev 14 | H40P_SPI_0_1CS_ST7789V_240x320 spi-cc-1cs-st7789v-240x320-bgr-fbdev 15 | H40P_SPI_0_2CS spi-cc-2cs 16 | H40P_SPI_0_2CS_DEV spi-cc-2cs-spidev 17 | H40P_SPI_0_2CS_LCD_35 spi-cc-2cs-ili9486-xpt2046 18 | H40P_SPI_0_2CS_LCD_35_MPI3501 spi-cc-2cs-mpi3501 19 | H40P_SPI_0_2CS_LCD_35_MHS3528 spi-cc-2cs-mhs3528 20 | # UART 21 | H40P_UART_0 uart-a-clk81 22 | H40P_UART_P5_P3 uart-ao-a 23 | H40P_UART_P19_P21 uart-c-clk81 24 | # PWM 25 | H40P_PWM_P11 pwm-ao-a 26 | H40P_PWM_P32 pwm-e 27 | H40P_PWM_P33 pwm-a 28 | H40P_PWM_P35 pwm-f 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/enc28j60-overlay.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-enc28j60.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/i2c-a-at24c32.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables AT24C32 EEPROM on I2C_A bus address 0x57 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@1 { 18 | target = <&i2c_AO>; 19 | 20 | __overlay__ { 21 | eeprom@57 { 22 | compatible = "at,24c32"; 23 | reg = <0x57>; 24 | }; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/i2c-a-ds3231.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables DS3231 RTC on I2C_A bus address 0x68 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@1 { 18 | target = <&i2c_A>; 19 | 20 | __overlay__ { 21 | rtc@68 { 22 | compatible = "maxim,ds3231"; 23 | reg = <0x68>; 24 | }; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/i2c-a-ssd1306-128x32.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SSD3306 on I2C A 9 | * Please update the AML-S805X-AC firmware to the latest version. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&i2c_A>; 20 | 21 | __overlay__ { 22 | ssd1306@3c { 23 | compatible = "solomon,ssd1306"; 24 | reg = <0x3c>; 25 | solomon,width = <128>; 26 | solomon,height = <32>; 27 | solomon,com-invdir; 28 | solomon,com-seq; 29 | solomon,page-offset = <0>; 30 | }; 31 | }; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/i2c-a-ssd1306-128x64.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SSD3306 on I2C A 9 | * Please update the AML-S805X-AC firmware to the latest version. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&i2c_A>; 20 | 21 | __overlay__ { 22 | ssd1306@3c { 23 | compatible = "solomon,ssd1306"; 24 | reg = <0x3c>; 25 | solomon,width = <128>; 26 | solomon,height = <64>; 27 | solomon,com-invdir; 28 | solomon,page-offset = <8>; 29 | }; 30 | }; 31 | }; 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/i2c-a.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables I2C_A on 40P header 7J1 pins 27 (SDA) and 28 (SCL) as i2c-1 9 | * Please update the AML-S805X-AC firmware to the latest version. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target-path = "/aliases"; 20 | 21 | __overlay__ { 22 | i2c1 = "/soc/bus@c1100000/i2c@8500"; 23 | }; 24 | }; 25 | 26 | 27 | fragment@1 { 28 | target = <&i2c_A>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&i2c_a_pins>; 33 | pinctrl-names = "default"; 34 | }; 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pitft22-overlay.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-pitft22.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pps-gpio-7j1-12.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Peter Rippe 3 | * Author: Peter Rippe 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to create pps-gpio on 7J1 pin 12 (GPIOH_7) 10 | * This requires an GPIO to IRQ enabled kernel and will not work without one. 11 | * 12 | * Note: Level interrupt is more stable on the s805x than rising edge. 13 | */ 14 | 15 | /dts-v1/; 16 | /plugin/; 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | / { 24 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 25 | 26 | fragment@0 { 27 | target-path = "/"; 28 | __overlay__ { 29 | pps_gpio: pps-gpio { 30 | compatible = "pps-gpio"; 31 | pinctrl-names = "default"; 32 | pinctrl-o = <&i2s_out_ao_clk_pins>; 33 | gpios = <&gpio GPIOH_7 GPIO_ACTIVE_HIGH>; 34 | interrupts = <&gpio_intc IRQID_GPIOH_7 IRQ_TYPE_LEVEL_HIGH>; 35 | status = "okay"; 36 | }; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pwm-a.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables PWM A on Header 7J1 Pin 33 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target = <&pwm_ab>; 21 | 22 | __overlay__ { 23 | status = "okay"; 24 | pinctrl-0 = <&pwm_a_pins>; 25 | pinctrl-names = "default"; 26 | clocks = <&clkc CLKID_FCLK_DIV4>; 27 | clock-names = "clkin0"; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pwm-ao-a.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables PWM AO A on Header 7J1 Pin 11 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target = <&cec_AO>; 21 | 22 | __overlay__ { 23 | status = "disabled"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&pwm_AO_ab>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&pwm_ao_a_8_pins>; 33 | pinctrl-names = "default"; 34 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 35 | clock-names = "xtal", "clk81"; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pwm-e.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables PWM E on Header 7J1 Pin 32 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target = <&pwm_ef>; 21 | 22 | __overlay__ { 23 | status = "okay"; 24 | pinctrl-0 = <&pwm_e_pins>; 25 | pinctrl-names = "default"; 26 | clocks = <&clkc CLKID_FCLK_DIV4>; 27 | clock-names = "clkin0"; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/pwm-f.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables PWM F on Header 7J1 Pin 35 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target = <&pwm_ef>; 21 | 22 | __overlay__ { 23 | status = "okay"; 24 | pinctrl-0 = <&pwm_f_x_pins>; 25 | pinctrl-names = "default"; 26 | clocks = <&clkc CLKID_FCLK_DIV4>; 27 | clock-names = "clkin0"; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/rpi-sense.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add support for the Raspberry Pi Sense Hat 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 20 | 21 | fragment@1 { 22 | target = <&i2c_AO>; 23 | 24 | __overlay__ { 25 | rpi-sense@46 { 26 | compatible = "rpi,rpi-sense"; 27 | reg = <0x46>; 28 | keys-int-gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>; 29 | status = "okay"; 30 | }; 31 | 32 | lsm9ds1-magn@1c { 33 | compatible = "st,lsm9ds1-magn"; 34 | reg = <0x1c>; 35 | status = "okay"; 36 | }; 37 | 38 | lsm9ds1-accel6a { 39 | compatible = "st,lsm9ds1-accel"; 40 | reg = <0x6a>; 41 | status = "okay"; 42 | }; 43 | 44 | lps25h-press@5c { 45 | compatible = "st,lps25h-press"; 46 | reg = <0x5c>; 47 | status = "okay"; 48 | }; 49 | 50 | hts221-humid@5f { 51 | compatible = "st,hts221-humid"; 52 | reg = <0x5f>; 53 | status = "okay"; 54 | }; 55 | }; 56 | }; 57 | }; 58 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/sdio-rtl8822cs.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 BayLibre, SAS. 3 | * Author: Nicolas Belin 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable SDIO on emmc_a. This includes enabling pwm-e and 10 | * uartc. 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", 22 | "amlogic,meson-gxl"; 23 | fragment@0 { 24 | target = <&uart_C>; 25 | 26 | __overlay__ { 27 | bluetooth { 28 | compatible = "realtek,rtl8822cs-bt"; 29 | enable-gpios = <&gpio GPIOX_12 GPIO_ACTIVE_HIGH>; 30 | host-wake-gpios = <&gpio GPIOX_13 GPIO_ACTIVE_HIGH>; 31 | }; 32 | }; 33 | }; 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-enc28j60.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables userspace spidev on SPICC bus with CS0 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | / { 20 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 21 | 22 | fragment@0 { 23 | target = <&spicc>; 24 | 25 | __overlay__ { 26 | 27 | #address-cells = <1>; 28 | #size-cells = <0>; 29 | 30 | eth1: enc28j60@0 { 31 | compatible = "microchip,enc28j60"; 32 | reg = <0>; 33 | interrupt-parent = <&gpio_intc>; 34 | interrupts = ; 35 | spi-max-frequency = <20000000>; 36 | status = "okay"; 37 | }; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-ili9341.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables Ilitek ILI9341 panels: 9 | * - Adafruit 2.2" SPI display 10 | * - Adafruit 2.8" Touch Shield V2 (SPI) 11 | * - Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket 12 | * - Adafruit 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket 13 | * - Adafruit 2.2" 18-bit color TFT LCD display with microSD card breakout 14 | * - Adafruit TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers 15 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS), 29 (DC), 31 (Reset) 16 | */ 17 | 18 | /dts-v1/; 19 | /plugin/; 20 | 21 | #include 22 | #include 23 | 24 | / { 25 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 26 | 27 | fragment@0 { 28 | target = <&spicc>; 29 | 30 | __overlay__ { 31 | /* 32 | * The display signals are connected to : 33 | * - SDO(MISO) to Pin21 (SPI_MISO) 34 | * - LED/Backlight to Pin2 (5v) 35 | * - SCK to Pin23 (SPI_CLK) 36 | * - SDI(MOSI) to Pin19 (SPI_MOSI) 37 | * - D/C to Pin29 (GPIOX_17) 38 | * - RESET to Pin31 (GPIOX_18) 39 | * - (LCD) CS to Pin24 (GPIOX_10) 40 | * - GND to Pin25 (GND) 41 | * - VCC/VIN to Pin17 (3.3V) 42 | */ 43 | display@0 { 44 | compatible = "adafruit,yx240qv29", "ilitek,ili9341"; 45 | reg = <0>; 46 | buswidth = <8>; 47 | spi-max-frequency = <30000000>; 48 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 49 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; 50 | status = "okay"; 51 | }; 52 | }; 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-mcp2515-can0.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Libre Computer 3 | * Author: Thomas McKahan 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /dts-v1/; 9 | /plugin/; 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | /* clock for controller */ 20 | fragment@0 { 21 | target-path = "/"; 22 | __overlay__ { 23 | /* external oscillator of mcp2515 on SPI0.0 */ 24 | osc_can0: osc_can0 { 25 | compatible = "fixed-clock"; 26 | #clock-cells = <0>; 27 | clock-frequency = <12000000>; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target = <&spicc>; 34 | __overlay__ { 35 | #address-cells = <1>; 36 | #size-cells = <0>; 37 | can0: mcp2515@0 { 38 | compatible = "microchip,mcp2515"; 39 | reg = <0>; 40 | clocks = <&osc_can0>; 41 | interrupt-parent = <&gpio_intc>; 42 | interrupts = ; 43 | spi-max-frequency = <10000000>; 44 | }; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-pitft22.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Thomas McKahan 3 | * Author: Thomas McKahan 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay to enable the Ilitek ILI9341 Hat-shaped panels: 10 | * - Adafruit 2.4" TFT LCD with Touchscreen Hat 11 | * - Adafruit 2.8" TFT LCD with Touchscreen Hat 12 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS), 22 (DC) 13 | */ 14 | 15 | /dts-v1/; 16 | /plugin/; 17 | 18 | #include 19 | #include 20 | 21 | / { 22 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 23 | 24 | fragment@0 { 25 | target = <&spicc>; 26 | 27 | __overlay__ { 28 | display@0 { 29 | compatible = "adafruit,yx240qv29", "ilitek,ili9341"; 30 | reg = <0>; 31 | buswidth = <8>; 32 | spi-max-frequency = <30000000>; 33 | dc-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 34 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; 35 | rotation = <90>; 36 | status = "okay"; 37 | }; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC userspace spidev for spi-cc-1cs 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target = <&spicc>; 19 | 20 | __overlay__ { 21 | spidev@0 { 22 | compatible = "rohm,dh2228fv"; 23 | reg = <0>; 24 | spi-max-frequency = <41666666>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-st7789v-240x320-bgr-fbdev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | st7789v@0 { 21 | compatible = "sitronix,st7789v"; 22 | reg = <0>; 23 | led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 24 | dc-gpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>; 25 | reset-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 26 | height = <320>; 27 | width = <240>; 28 | rotate = <180>; 29 | buswidth = <16>; 30 | spi-cpol; 31 | spi-cpha; 32 | bgr; 33 | spi-max-frequency = <41666666>; 34 | status = "okay"; 35 | }; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs-st7789v-240x320-fbdev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | st7789v@0 { 21 | compatible = "sitronix,st7789v"; 22 | reg = <0>; 23 | led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 24 | dc-gpios = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>; 25 | reset-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 26 | height = <320>; 27 | width = <240>; 28 | rotate = <180>; 29 | buswidth = <16>; 30 | spi-cpol; 31 | spi-cpha; 32 | spi-max-frequency = <41666666>; 33 | status = "okay"; 34 | }; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC on header 7J1 pins: 9 | * 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CE0) 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | 24 | __overlay__ { 25 | spi0 = "/soc/cbus@c1100000/spi@8d80"; 26 | }; 27 | }; 28 | 29 | fragment@1 { 30 | target = <&spicc>; 31 | 32 | __overlay__ { 33 | status = "okay"; 34 | pinctrl-0 = <&spi_pins>; 35 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 36 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 37 | pinctrl-names = "default", "idle-high", "idle-low"; 38 | 39 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; 40 | }; 41 | }; 42 | }; 43 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <41666667>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOH_9 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <2000000>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | wakeup-source; 52 | status = "okay"; 53 | }; 54 | }; 55 | }; 56 | }; 57 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <41666666>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOH_9 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <1302084>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | touchscreen-swapped-x-y; 52 | touchscreen-inverted-x; 53 | touchscreen-min-x = <180>; 54 | touchscreen-size-x = <3880>; 55 | touchscreen-min-y = <240>; 56 | touchscreen-size-y = <3940>; 57 | wakeup-source; 58 | status = "okay"; 59 | }; 60 | }; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <20833333>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOH_9 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <1302084>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | touchscreen-swapped-x-y; 52 | touchscreen-inverted-x; 53 | touchscreen-min-x = <300>; 54 | touchscreen-size-x = <3850>; 55 | touchscreen-min-y = <240>; 56 | touchscreen-size-y = <3900>; 57 | wakeup-source; 58 | status = "okay"; 59 | }; 60 | }; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC userspace spidev for spi-cc-2cs 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target = <&spicc>; 19 | 20 | __overlay__ { 21 | spidev@0 { 22 | compatible = "rohm,dh2228fv"; 23 | reg = <0>; 24 | spi-max-frequency = <41666666>; 25 | }; 26 | spidev@1 { 27 | compatible = "rohm,dh2228fv"; 28 | reg = <1>; 29 | spi-max-frequency = <41666666>; 30 | }; 31 | }; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-2cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPICC on header 7J1 pins: 9 | * 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CE0), 26 (CE1) 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | 24 | __overlay__ { 25 | spi0 = "/soc/cbus@c1100000/spi@8d80"; 26 | }; 27 | }; 28 | 29 | fragment@1 { 30 | target = <&spicc>; 31 | 32 | __overlay__ { 33 | status = "okay"; 34 | pinctrl-0 = <&spi_pins>; 35 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 36 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 37 | pinctrl-names = "default", "idle-high", "idle-low"; 38 | 39 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>, <&gpio GPIOX_1 GPIO_ACTIVE_LOW>; 40 | }; 41 | }; 42 | }; 43 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spi-cc-mosi-idle-low.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Internal SPI MOSI pull-down is insufficient for the default drive but this tries anyway. 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&spi_pins>; 22 | 23 | __overlay__ { 24 | mux-1 { 25 | groups = "spi_mosi"; 26 | bias-pull-down; 27 | }; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spicc-cs1-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spicc-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spicc-ili9341.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-ili9341.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spicc-mcp2515-can0.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-enc28j60.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spicc.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/spidev-spicc.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-a-clk81.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_A on 40P header 7J1 pins 8 (TX) and 10 (RX) with CLK81 for additional baud rates 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&uart_A>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&uart_a_pins>; 33 | pinctrl-names = "default"; 34 | clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>; 35 | clock-names = "xtal", "pclk", "baud"; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-a-invert-tx.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Invert UART_A TX on 40P header 7J1 pin 8 9 | * This overlay must be merged and will only take effect after reboot. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&uart_A>; 20 | 21 | __overlay__ { 22 | uart-invert-tx; 23 | }; 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-a.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_A on 40P header 7J1 pins 8 (TX) and 10 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target-path = "/aliases"; 19 | 20 | __overlay__ { 21 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&uart_A>; 27 | 28 | __overlay__ { 29 | status = "okay"; 30 | pinctrl-0 = <&uart_a_pins>; 31 | pinctrl-names = "default"; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-b-clk81.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_B on 40P header 7J1 pins 27 (TX) and 28 (RX) with CLK81 for additional baud rates 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | serial2 = "/soc/cbus@c1100000/serial@84dc"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&uart_B>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&uart_b_pins>; 33 | pinctrl-names = "default"; 34 | clocks = <&xtal>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>; 35 | clock-names = "xtal", "pclk", "baud"; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-b-invert-tx.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Invert UART_B TX on 40P header 7J1 pin 27 9 | * This overlay must be merged and will only take effect after reboot. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&uart_B>; 20 | 21 | __overlay__ { 22 | uart-invert-tx; 23 | }; 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-b.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_B on 40P header 7J1 pins 27 (TX) and 28 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target-path = "/aliases"; 19 | 20 | __overlay__ { 21 | serial2 = "/soc/cbus@c1100000/serial@84dc"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&uart_B>; 27 | 28 | __overlay__ { 29 | status = "okay"; 30 | pinctrl-0 = <&uart_b_pins>; 31 | pinctrl-names = "default"; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-c-clk81.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C on 40P header 7J1 pins 19 (TX) and 21 (RX) with CLK81 for additional baud rates 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | serial3 = "/soc/cbus@c1100000/serial@8700"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&uart_C>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&uart_c_pins>; 33 | pinctrl-names = "default"; 34 | clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>; 35 | clock-names = "xtal", "pclk", "baud"; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-c-cts-rts-clk81.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C on 40P header 7J1 pins 19 (TX), 21 (RX), 23 (RTS), 24 (CTS) 9 | * with CLK81 for additional baud rates 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | serial3 = "/soc/cbus@c1100000/serial@8700"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&uart_C>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&uart_c_pins>,<&uart_c_cts_rts_pins>; 34 | pinctrl-names = "default"; 35 | uart-has-rtscts; 36 | clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>; 37 | clock-names = "xtal", "pclk", "baud"; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-c-cts-rts.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C on 40P header 7J1 pins 19 (TX), 21 (RX), 23 (RTS), 24 (CTS) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target-path = "/aliases"; 19 | 20 | __overlay__ { 21 | serial3 = "/soc/cbus@c1100000/serial@8700"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&uart_C>; 27 | 28 | __overlay__ { 29 | status = "okay"; 30 | pinctrl-0 = <&uart_c_pins>,<&uart_c_cts_rts_pins>; 31 | pinctrl-names = "default"; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-c-invert-tx.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Invert UART_C TX on 40P header 7J1 pin 19 9 | * This overlay must be merged and will only take effect after reboot. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&uart_C>; 20 | 21 | __overlay__ { 22 | uart-invert-tx; 23 | }; 24 | }; 25 | }; 26 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uart-c.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART_C on 40P header 7J1 pins 19 (TX) and 21 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 16 | 17 | fragment@0 { 18 | target-path = "/aliases"; 19 | 20 | __overlay__ { 21 | serial3 = "/soc/cbus@c1100000/serial@8700"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&uart_C>; 27 | 28 | __overlay__ { 29 | status = "okay"; 30 | pinctrl-0 = <&uart_c_pins>; 31 | pinctrl-names = "default"; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uarta-clk81.dts: -------------------------------------------------------------------------------- 1 | uart-a-clk81.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/uarta.dts: -------------------------------------------------------------------------------- 1 | uart-a.dts -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/usb-device-mode.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 12 | 13 | fragment@0 { 14 | target = <&usb>; 15 | 16 | __overlay__ { 17 | dr_mode = "peripheral"; 18 | }; 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/dt/w1-gpio.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables soft 1-wire on 40P header 7J1 pin 7 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s805x-ac", "amlogic,s805x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target-path = "/"; 22 | __overlay__ { 23 | onewire@0 { 24 | compatible = "w1-gpio"; 25 | gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; 26 | status = "okay"; 27 | }; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s805x-ac/gpio.config: -------------------------------------------------------------------------------- 1 | GPIO_DEBUG_PATH=vendor/aml/gxl/gpio_debug 2 | -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc-v01/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-sm1-s905d3-libretech-cc-v01.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc-v01/dt/cpu-opp-2208.dts: -------------------------------------------------------------------------------- 1 | ../../aml-s905d3-cc/dt/cpu-opp-2208.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc-v01/dt/npu.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/npu.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc-v01/dt/spifc-nor.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spifc-nor.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc-v01/gpio.map: -------------------------------------------------------------------------------- 1 | ../aml-a311d-cc-v01/gpio.map -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-sm1-s905d3-libretech-cc.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt.map: -------------------------------------------------------------------------------- 1 | ../aml-a311d-cc/dt.map -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/cpu-opp-2208.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-s905d3-cc"; 12 | 13 | fragment@0 { 14 | target = <&cpu_opp_table>; 15 | 16 | __overlay__ { 17 | opp-2208000000 { 18 | opp-hz = /bits/ 64 <2208000000>; 19 | opp-microvolt = <1011000>; 20 | }; 21 | }; 22 | }; 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/i2c-2.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/i2c-2.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/i2c-ao.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/i2c-ao.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/npu.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/npu.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc0-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc0-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc0-1cs.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc0-1cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-1cs.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-1cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-2cs-mhs3528.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-2cs-mpi3501.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-2cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spi-cc1-2cs.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spi-cc1-2cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/spifc-nor.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/spifc-nor.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/uart-ao-b-23.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/uart-ao-b-23.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/uart-ao-b-89.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/uart-ao-b-89.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/uart-c-rts-cts.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/uart-c-rts-cts.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/dt/uart-c.dts: -------------------------------------------------------------------------------- 1 | ../../aml-a311d-cc/dt/uart-c.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905d3-cc/gpio.map: -------------------------------------------------------------------------------- 1 | ../aml-a311d-cc/gpio.map -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc-v2/dt: -------------------------------------------------------------------------------- 1 | ../aml-s905x-cc/dt -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc-v2/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=amlogic/meson-gxl-s905x-libretech-cc-v2.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc-v2/dt.map: -------------------------------------------------------------------------------- 1 | ../aml-s905x-cc/dt.map -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc-v2/gpio.config: -------------------------------------------------------------------------------- 1 | GPIO_DEBUG_PATH=vendor/aml/gxl/gpio_debug 2 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc-v2/gpio.map: -------------------------------------------------------------------------------- 1 | ../aml-s905x-cc/gpio.map -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb #dtb/current 2 | DT_OVERRIDE=amlogic/meson-gxl-s905x-libretech-cc.dtb #libre-computer/aml-s905x-cc/base.dtb -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt.map: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | # I2C 4 | H40P_I2C_0 i2c-ao 5 | H40P_I2C_0_SSD1306_128x32 i2c-ao-ssd1306-128x32 6 | H40P_I2C_0_SSD1306_128x64 i2c-ao-ssd1306-128x64 7 | H40P_I2C_1 i2c-b 8 | H40P_I2C_1_SSD1306_128x32 i2c-b-ssd1306-128x32 9 | H40P_I2C_1_SSD1306_128x64 i2c-b-ssd1306-128x64 10 | H40P_I2C_P23_P24 i2c-d 11 | # SPI 12 | H40P_SPI_0_1CS spi-cc-1cs 13 | H40P_SPI_0_1CS_DEV spi-cc-1cs-spidev 14 | H40P_SPI_0_1CS_ST7789V_240x320 spi-cc-1cs-st7789v-240x320-bgr-fbdev 15 | H40P_SPI_0_2CS spi-cc-2cs 16 | H40P_SPI_0_2CS_DEV spi-cc-2cs-spidev 17 | H40P_SPI_0_2CS_LCD_35 spi-cc-2cs-ili9486-xpt2046 18 | H40P_SPI_0_2CS_LCD_35_MPI3501 spi-cc-2cs-mpi3501 19 | H40P_SPI_0_2CS_LCD_35_MHS3528 spi-cc-2cs-mhs3528 20 | # UART 21 | H40P_UART_0 uart-a-clk81 22 | H40P_UART_P5_P3 uart-ao-b 23 | H40P_UART_P19_P21 uart-c-clk81 24 | # PWM 25 | H40P_PWM_P11 pwm-ao-a 26 | H40P_PWM_P12 pwm-ao-b-6 27 | H40P_PWM_P13 pwm-ao-b-9 28 | H40P_PWM_P32 pwm-e 29 | H40P_PWM_P33 pwm-a 30 | H40P_PWM_P35 pwm-f 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/cvbs-disable.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 12 | 13 | fragment@0 { 14 | target-path = "/cvbs-connector"; 15 | 16 | __overlay__ { 17 | status = "disabled"; 18 | }; 19 | }; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/enc28j60-overlay.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-enc28j60.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/gpio-key-power-2j3-6.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Create a GPIO button on 2J3 pin 6 (GPIOH_6) linked to the power key 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target-path = "/"; 25 | __overlay__ { 26 | gpio_keys: gpio-keys { 27 | compatible = "gpio-keys"; 28 | #address-cells = <1>; 29 | #size-cells = <0>; 30 | autorepeat; 31 | 32 | power-button { 33 | label = "GPIOH_6 Power Button"; 34 | linux,code = <116>; 35 | interrupts-extended = <&gpio_intc IRQID_GPIOH_6 IRQ_TYPE_LEVEL_LOW>; 36 | linux,can-disable; 37 | wakeup-source; 38 | }; 39 | }; 40 | }; 41 | }; 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/gpio-key-power-7j1-31.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to create a gpio button on 7J1 pin 31 (GPIOX_18) linked to the power key 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target-path = "/"; 25 | __overlay__ { 26 | gpio_keys: gpio-keys { 27 | compatible = "gpio-keys"; 28 | #address-cells = <1>; 29 | #size-cells = <0>; 30 | autorepeat; 31 | 32 | power-button { 33 | label = "Power Button"; 34 | linux,code = <116>; 35 | interrupts-extended = <&gpio_intc IRQID_GPIOX_18 IRQ_TYPE_LEVEL_LOW>; 36 | linux,can-disable; 37 | wakeup-source; 38 | }; 39 | }; 40 | }; 41 | }; 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/gpio-key-power-9j1-2.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Create a GPIO button on 9J1 pin 2 (GPIOH_4) linked to the power key 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target-path = "/"; 25 | __overlay__ { 26 | gpio_keys: gpio-keys { 27 | compatible = "gpio-keys"; 28 | #address-cells = <1>; 29 | #size-cells = <0>; 30 | autorepeat; 31 | 32 | power-button { 33 | label = "GPIOH_4 Power Button"; 34 | linux,code = <116>; 35 | interrupts-extended = <&gpio_intc IRQID_GPIOH_4 IRQ_TYPE_LEVEL_LOW>; 36 | linux,can-disable; 37 | wakeup-source; 38 | }; 39 | }; 40 | }; 41 | }; 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-at24c32.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Thomas Rohloff 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add an AT24C32 EEPROM module on I2C_AO bus, address 0x57. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@1 { 19 | target = <&i2c_AO>; 20 | 21 | __overlay__ { 22 | eeprom@57 { 23 | compatible = "at,24c32"; 24 | reg = <0x57>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-ds3231.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add an DS3231 RTC module on I2C_AO bus, address 0x68. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@1 { 19 | target = <&i2c_AO>; 20 | 21 | __overlay__ { 22 | rtc@68 { 23 | compatible = "maxim,ds3231"; 24 | reg = <0x68>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-pcf8523.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Copyright (c) 2023 Joshua Dye. 4 | * 5 | * Original Author: Neil Armstrong 6 | * 7 | * Modified for PCF8523 by: Joshua Dye 8 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 9 | */ 10 | 11 | /* 12 | * Overlay aimed to add an PCF823 RTC module on I2C_AO bus, address 0x68. 13 | * Modified from DS3231 overlay. 14 | */ 15 | 16 | /dts-v1/; 17 | /plugin/; 18 | 19 | / { 20 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 21 | 22 | fragment@1 { 23 | target = <&i2c_AO>; 24 | 25 | __overlay__ { 26 | rtc@68 { 27 | compatible = "nxp,pcf8523"; 28 | reg = <0x68>; 29 | }; 30 | }; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-rpi-sense.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add support for the Raspberry Pi Sense Hat 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 20 | 21 | fragment@1 { 22 | target = <&i2c_AO>; 23 | 24 | __overlay__ { 25 | rpi-sense@46 { 26 | compatible = "rpi,rpi-sense"; 27 | reg = <0x46>; 28 | keys-int-gpios = <&gpio GPIOX_14 GPIO_ACTIVE_LOW>; 29 | status = "okay"; 30 | }; 31 | 32 | lsm9ds1-magn@1c { 33 | compatible = "st,lsm9ds1-magn"; 34 | reg = <0x1c>; 35 | status = "okay"; 36 | }; 37 | 38 | lsm9ds1-accel6a { 39 | compatible = "st,lsm9ds1-accel"; 40 | reg = <0x6a>; 41 | status = "okay"; 42 | }; 43 | 44 | lps25h-press@5c { 45 | compatible = "st,lps25h-press"; 46 | reg = <0x5c>; 47 | status = "okay"; 48 | }; 49 | 50 | hts221-humid@5f { 51 | compatible = "st,hts221-humid"; 52 | reg = <0x5f>; 53 | status = "okay"; 54 | }; 55 | }; 56 | }; 57 | }; 58 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-rv3028.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Mark Bumiller 3 | * Author: Mark Bumiller 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add an RV3028 RTC module on I2C_AO bus, address 0x68. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@1 { 19 | target = <&i2c_AO>; 20 | 21 | __overlay__ { 22 | rtc@52 { 23 | compatible = "microcrystal,rv3028"; 24 | reg = <0x52>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao-ssd1306-128x64.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 12 | 13 | fragment@1 { 14 | target = <&i2c_AO>; 15 | 16 | __overlay__ { 17 | ssd1306@3c { 18 | compatible = "solomon,ssd1306"; 19 | reg = <0x3c>; 20 | solomon,width = <128>; 21 | solomon,height = <64>; 22 | solomon,com-invdir; 23 | solomon,page-offset = <8>; 24 | }; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-ao.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable I2C_AO on Header 7J1 : 10 | * Pins 3 (SDA), 5 (SCL) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | / { 17 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | i2c1 = "/soc/aobus@c8100000/i2c@500"; 24 | }; 25 | }; 26 | 27 | 28 | fragment@1 { 29 | target = <&i2c_AO>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&i2c_ao_pins>; 34 | pinctrl-names = "default"; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-b-at24c32.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Thomas Rohloff 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add an AT24C32 EEPROM module on I2C_B bus, address 0x57. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@1 { 19 | target = <&i2c_B>; 20 | 21 | __overlay__ { 22 | eeprom@57 { 23 | compatible = "at,24c32"; 24 | reg = <0x57>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-b-ds3231.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to add an DS3231 RTC module on I2C_B bus, address 0x68. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@1 { 19 | target = <&i2c_B>; 20 | 21 | __overlay__ { 22 | rtc@68 { 23 | compatible = "maxim,ds3231"; 24 | reg = <0x68>; 25 | }; 26 | }; 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/i2c-b.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable I2C_B on Header 7J1 : 10 | * Pins 27 (SDA), 28 (SCL) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | / { 17 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | i2c0 = "/soc/cbus@c1100000/i2c@87c0"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&i2c_b_pins>; 29 | 30 | __overlay__ { 31 | cfg { 32 | pins = "GPIODV_26", "GPIODV_27"; 33 | bias-pull-up; 34 | }; 35 | }; 36 | }; 37 | 38 | fragment@2 { 39 | target = <&i2c_B>; 40 | 41 | __overlay__ { 42 | status = "okay"; 43 | pinctrl-0 = <&i2c_b_pins>; 44 | pinctrl-names = "default"; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pitft22-overlay.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-pitft22.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pps-gpio-7j1-12.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to create pps-gpio on 7J1 pin 12 (GPIOAO_6) 10 | * This requires an GPIO to IRQ enabled kernel and will not work without one. 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | / { 22 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 23 | 24 | fragment@0 { 25 | target-path = "/"; 26 | __overlay__ { 27 | pps_gpio: pps-gpio { 28 | compatible = "pps-gpio"; 29 | pinctrl-names = "default"; 30 | pinctrl-o = <&spdif_out_ao_6_pins>; 31 | gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; 32 | interrupts = <&gpio_intc IRQID_GPIOAO_6 IRQ_TYPE_EDGE_RISING>; 33 | assert-rising-edge; 34 | status = "okay"; 35 | }; 36 | }; 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-a-fan-auto.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable automatic temperature-based fan control on PWM A on Header 7J1 Pin 33 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | / { 22 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 23 | 24 | fragment@0 { 25 | target = <&fan0>; 26 | __overlay__ { 27 | cooling-levels = <0 100 150 200 255>; 28 | #cooling-cells = <2>; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/thermal-zones/cpu-thermal/trips"; 34 | __overlay__ { 35 | cpu_active: cpu-active { 36 | temperature = <50000>; 37 | hysteresis = <2000>; 38 | type = "active"; 39 | }; 40 | cpu_warm: cpu-warm { 41 | temperature = <60000>; 42 | hysteresis = <2000>; 43 | type = "active"; 44 | }; 45 | }; 46 | }; 47 | 48 | fragment@2 { 49 | target = <&cpu_cooling_maps>; 50 | __overlay__ { 51 | map2 { 52 | trip = <&cpu_active>; 53 | cooling-device = <&fan0 THERMAL_NO_LIMIT 1>; 54 | }; 55 | map3 { 56 | trip = <&cpu_warm>; 57 | cooling-device = <&fan0 2 THERMAL_NO_LIMIT>; 58 | }; 59 | }; 60 | }; 61 | }; 62 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-a-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM A on Header 7J1 Pin 33 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_ab 0 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-a.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM A on Header 7J1 Pin 33 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_ab>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_a_pins>; 26 | pinctrl-names = "default"; 27 | clocks = <&clkc CLKID_FCLK_DIV4>; 28 | clock-names = "clkin0"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-6.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM AO A and B on Header 7J1 Pin 11 and Pin 12 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&cec_AO>; 22 | 23 | __overlay__ { 24 | status = "disabled"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pwm_AO_ab>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&pwm_ao_a_8_pins>, <&pwm_ao_b_6_pins>; 34 | pinctrl-names = "default", "default"; 35 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 36 | clock-names = "xtal", "clk81"; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-9.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM AO A and B on Header 7J1 Pin 11 and Pin 13 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&cec_AO>; 22 | 23 | __overlay__ { 24 | status = "disabled"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pwm_AO_ab>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&pwm_ao_a_8_pins>, <&pwm_ao_b_pins>; 34 | pinctrl-names = "default", "default"; 35 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 36 | clock-names = "xtal", "clk81"; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-a-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM AO a on Header 7J1 Pin 11 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_AO_ab 0 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-a.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM AO A on Header 7J1 Pin 11 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&cec_AO>; 22 | 23 | __overlay__ { 24 | status = "disabled"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&pwm_AO_ab>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&pwm_ao_a_8_pins>; 34 | pinctrl-names = "default"; 35 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 36 | clock-names = "xtal", "clk81"; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-b-6-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM AO b on Header 7J1 Pin 12 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_AO_ab 1 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-b-6.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM AO B 6 on Header 7J1 Pin 12 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_AO_ab>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_ao_b_6_pins>; 26 | pinctrl-names = "default"; 27 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 28 | clock-names = "xtal", "clk81"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-b-9-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM AO b on Header 7J1 Pin 13 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_AO_ab 1 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ao-b-9.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM AO B 9 on Header 7J1 Pin 13 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_AO_ab>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_ao_b_pins>; 26 | pinctrl-names = "default"; 27 | clocks = <&xtal>, <&clkc CLKID_CLK81>; 28 | clock-names = "xtal", "clk81"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-e-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM E on Header 7J1 Pin 32 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_ef 0 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-e.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM E on Header 7J1 Pin 32 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_ef>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_e_pins>; 26 | pinctrl-names = "default"; 27 | clocks = <&clkc CLKID_FCLK_DIV4>; 28 | clock-names = "clkin0"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-ef.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM E and F on Header 7J1 Pin 32 and 35 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_ef>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_e_pins>, <&pwm_f_x_pins>; 26 | pinctrl-names = "default", "default"; 27 | clocks = <&clkc CLKID_FCLK_DIV4>; 28 | clock-names = "clkin0"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-f-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM F on Header 7J1 Pin 35 with tach on Header 9J1 Pin 2 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spdif_out_h_pins>; 25 | __overlay__ { 26 | mux { 27 | bias-pull-up; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target-path = "/"; 34 | __overlay__ { 35 | fan0: pwm-fan { 36 | compatible = "pwm-fan"; 37 | pwms = <&pwm_ef 1 25000 0>; 38 | interrupt-parent = <&gpio_intc>; 39 | interrupts = ; 40 | pulses-per-revolution = <2>; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/pwm-f.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable PWM F on Header 7J1 Pin 35 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&pwm_ef>; 22 | 23 | __overlay__ { 24 | status = "okay"; 25 | pinctrl-0 = <&pwm_f_x_pins>; 26 | pinctrl-names = "default"; 27 | clocks = <&clkc CLKID_FCLK_DIV4>; 28 | clock-names = "clkin0"; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/rpi-sense.dts: -------------------------------------------------------------------------------- 1 | i2c-ao-rpi-sense.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/sd-uhs-sdr104.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* SD UHS increase max clock */ 8 | 9 | /dts-v1/; 10 | /plugin/; 11 | 12 | / { 13 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 14 | 15 | fragment@0 { 16 | target = <&sd_emmc_b>; 17 | 18 | __overlay__ { 19 | max-frequency = <200000000>; 20 | }; 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spdif.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 BayLibre, SAS. 3 | * Author: Jerome Brunet 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /dts-v1/; 9 | /plugin/; 10 | 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target-path = "/"; 18 | 19 | __overlay__ { 20 | spdif_dit: audio-codec { 21 | #sound-dai-cells = <0>; 22 | compatible = "linux,spdif-dit"; 23 | status = "okay"; 24 | sound-name-prefix = "SPDIF"; 25 | }; 26 | 27 | sound { 28 | dai-link-4 { 29 | sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; 30 | 31 | codec-0 { 32 | sound-dai = <&spdif_dit>; 33 | }; 34 | }; 35 | }; 36 | }; 37 | }; 38 | 39 | fragment@1 { 40 | target = <&aiu>; 41 | 42 | __overlay__ { 43 | pinctrl-0 = <&spdif_out_h_pins>; 44 | pinctrl-names = "default"; 45 | }; 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-enc28j60.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable a spidev interface on SPICC bus with CS0 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | / { 21 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 22 | 23 | fragment@0 { 24 | target = <&spicc>; 25 | 26 | __overlay__ { 27 | 28 | #address-cells = <1>; 29 | #size-cells = <0>; 30 | 31 | eth1: enc28j60@0 { 32 | compatible = "microchip,enc28j60"; 33 | reg = <0>; 34 | interrupt-parent = <&gpio_intc>; 35 | interrupts = ; 36 | spi-max-frequency = <20000000>; 37 | status = "okay"; 38 | }; 39 | }; 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-ili9341.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable the Ilitek ILI9341 based panels such as the : 10 | * - Adafruit 2.2" SPI display 11 | * - Adafruit 2.8" Touch Shield V2 (SPI) 12 | * - Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket 13 | * - Adafruit 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket 14 | * - Adafruit 2.2" 18-bit color TFT LCD display with microSD card breakout 15 | * - Adafruit TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers 16 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS), 29 (DC), 31 (Reset) 17 | */ 18 | 19 | /dts-v1/; 20 | /plugin/; 21 | 22 | #include 23 | #include 24 | 25 | / { 26 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 27 | 28 | fragment@0 { 29 | target = <&spicc>; 30 | 31 | __overlay__ { 32 | /* 33 | * The display signals are connected to : 34 | * - SDO(MISO) to Pin21 (SPI_MISO) 35 | * - LED/Backlight to Pin2 (5v) 36 | * - SCK to Pin23 (SPI_CLK) 37 | * - SDI(MOSI) to Pin19 (SPI_MOSI) 38 | * - D/C to Pin29 (GPIOX_17) 39 | * - RESET to Pin31 (GPIOX_18) 40 | * - (LCD) CS to Pin24 (GPIOX_10) 41 | * - GND to Pin25 (GND) 42 | * - VCC/VIN to Pin17 (3.3V) 43 | */ 44 | display@0 { 45 | compatible = "adafruit,yx240qv29", "ilitek,ili9341"; 46 | reg = <0>; 47 | buswidth = <8>; 48 | spi-max-frequency = <30000000>; 49 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 50 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; 51 | status = "okay"; 52 | }; 53 | }; 54 | }; 55 | }; 56 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-ili9486.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | 4 | #include 5 | #include 6 | 7 | / { 8 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 9 | 10 | fragment@0 { 11 | target = <&spicc>; 12 | 13 | __overlay__ { 14 | display@0 { 15 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 16 | reg = <0>; 17 | spi-max-frequency = <30000000>; 18 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 19 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 20 | status = "okay"; 21 | }; 22 | }; 23 | }; 24 | }; -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-mcp2515-can-dual.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Libre Computer 3 | * Author: Jeff Karney 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | * 7 | * Requires "spicc-cs1" DTS to be loaded first 8 | * Tested with the "Seengreat Dual-CH CAN HAT" Rev 3.1 [https://seengreat.com/dualchcanhat] 9 | * Interrupts may not be correct for other CAN hats. Adjust accordingly. 10 | * 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | / { 22 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 23 | 24 | /* clock for controller */ 25 | fragment@0 { 26 | target-path = "/"; 27 | __overlay__ { 28 | /* external oscillator of mcp2515 on SPI0.0 */ 29 | osc_can0: osc_can0 { 30 | compatible = "fixed-clock"; 31 | #clock-cells = <0>; 32 | clock-frequency = <16000000>; 33 | }; 34 | }; 35 | }; 36 | 37 | fragment@1 { 38 | target = <&spicc>; 39 | __overlay__ { 40 | #address-cells = <1>; 41 | #size-cells = <0>; 42 | can0: mcp2515@0 { 43 | compatible = "microchip,mcp2515"; 44 | reg = <0>; 45 | clocks = <&osc_can0>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | spi-max-frequency = <10000000>; 49 | }; 50 | 51 | can1: mcp2515@1 { 52 | compatible = "microchip,mcp2515"; 53 | reg = <1>; 54 | clocks = <&osc_can0>; 55 | interrupt-parent = <&gpio_intc>; 56 | interrupts = ; 57 | spi-max-frequency = <10000000>; 58 | }; 59 | 60 | }; 61 | }; 62 | }; 63 | 64 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-mcp2515-can0.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Libre Computer 3 | * Author: Thomas McKahan 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /dts-v1/; 9 | /plugin/; 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | / { 17 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 18 | 19 | /* clock for controller */ 20 | fragment@0 { 21 | target-path = "/"; 22 | __overlay__ { 23 | /* external oscillator of mcp2515 on SPI0.0 */ 24 | osc_can0: osc_can0 { 25 | compatible = "fixed-clock"; 26 | #clock-cells = <0>; 27 | clock-frequency = <12000000>; 28 | }; 29 | }; 30 | }; 31 | 32 | fragment@1 { 33 | target = <&spicc>; 34 | __overlay__ { 35 | #address-cells = <1>; 36 | #size-cells = <0>; 37 | can0: mcp2515@0 { 38 | compatible = "microchip,mcp2515"; 39 | reg = <0>; 40 | clocks = <&osc_can0>; 41 | interrupt-parent = <&gpio_intc>; 42 | interrupts = ; 43 | spi-max-frequency = <10000000>; 44 | }; 45 | }; 46 | }; 47 | }; 48 | 49 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-mcp3008.dts: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Device Tree Overlay to enable MCP3008 ADC 4 | */ 5 | 6 | /dts-v1/; 7 | /plugin/; 8 | 9 | #include 10 | #include 11 | 12 | / { 13 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 14 | 15 | fragment@0 { 16 | target = <&spicc>; 17 | 18 | __overlay__ { 19 | mcp3008@0 { 20 | compatible = "microchip,mcp3008"; 21 | reg = <0>; 22 | spi-max-frequency = <1600000>; 23 | status = "okay"; 24 | }; 25 | }; 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-pitft22.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Thomas McKahan 3 | * Author: Thomas McKahan 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay to enable the Ilitek ILI9341 Hat-shaped panels: 10 | * - Adafruit 2.4" TFT LCD with Touchscreen Hat 11 | * - Adafruit 2.8" TFT LCD with Touchscreen Hat 12 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS), 22 (DC) 13 | */ 14 | 15 | /dts-v1/; 16 | /plugin/; 17 | 18 | #include 19 | #include 20 | 21 | / { 22 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 23 | 24 | fragment@0 { 25 | target = <&spicc>; 26 | 27 | __overlay__ { 28 | display@0 { 29 | compatible = "adafruit,yx240qv29", "ilitek,ili9341"; 30 | reg = <0>; 31 | buswidth = <8>; 32 | spi-max-frequency = <30000000>; 33 | dc-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 34 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; 35 | rotation = <90>; 36 | status = "okay"; 37 | }; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable a spidev interface on SPICC bus with CS0 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&spicc>; 20 | 21 | __overlay__ { 22 | spidev@0 { 23 | compatible = "rohm,dh2228fv"; 24 | reg = <0>; 25 | spi-max-frequency = <41666666>; 26 | }; 27 | }; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-ssd1306-128x64.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | ssd1306@0 { 21 | compatible = "solomon,ssd1306"; 22 | reg = <0>; 23 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 24 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>; 25 | solomon,width = <128>; 26 | solomon,height = <64>; 27 | solomon,com-invdir; 28 | solomon,page-offset = <8>; 29 | spi-max-frequency = <41666666>; 30 | status = "okay"; 31 | }; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-st7735r-128x128-fbdev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | st7735r@0 { 21 | compatible = "sitronix,st7735r"; 22 | reg = <0>; 23 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 24 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>; 25 | 26 | led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 27 | height = <128>; 28 | width = <128>; 29 | buswidth = <16>; 30 | 31 | spi-max-frequency = <41666666>; 32 | status = "okay"; 33 | }; 34 | }; 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-st7735r-128x128.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target-path = "/"; 18 | 19 | __overlay__ { 20 | st7735r_backlight: backlight { 21 | compatible = "gpio-backlight"; 22 | gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 23 | default-on; 24 | }; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spicc>; 30 | 31 | __overlay__ { 32 | st7735r@0 { 33 | compatible = "okaya,rh128128t", "sitronix,st7735r"; 34 | backlight = <&st7735r_backlight>; 35 | reg = <0>; 36 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 37 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>; 38 | 39 | spi-max-frequency = <41666666>; 40 | status = "okay"; 41 | }; 42 | }; 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-st7789v-240x240.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | st7789v@0 { 21 | compatible = "sitronix,st7789v"; 22 | reg = <0>; 23 | led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 24 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 25 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>; 26 | height = <240>; 27 | width = <240>; 28 | buswidth = <16>; 29 | spi-cpol; 30 | spi-cpha; 31 | spi-max-frequency = <41666666>; 32 | status = "okay"; 33 | }; 34 | }; 35 | }; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs-st7789v-240x320-fbdev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spicc>; 18 | 19 | __overlay__ { 20 | st7789v@0 { 21 | compatible = "sitronix,st7789v"; 22 | reg = <0>; 23 | led-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 24 | dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 25 | reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_LOW>; 26 | height = <320>; 27 | width = <240>; 28 | rotate = <180>; 29 | buswidth = <16>; 30 | spi-cpol; 31 | spi-cpha; 32 | spi-max-frequency = <41666666>; 33 | status = "okay"; 34 | }; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable SPICC on Header 7J1 : 10 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (SS0) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | #include 18 | 19 | / { 20 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 21 | 22 | fragment@0 { 23 | target-path = "/aliases"; 24 | 25 | __overlay__ { 26 | spi0 = "/soc/cbus@c1100000/spi@8d80"; 27 | }; 28 | }; 29 | 30 | fragment@1 { 31 | target = <&spicc>; 32 | 33 | __overlay__ { 34 | status = "okay"; 35 | pinctrl-0 = <&spi_pins>; 36 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 37 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 38 | pinctrl-names = "default", "idle-high", "idle-low"; 39 | 40 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; 41 | }; 42 | }; 43 | }; 44 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs2-ads7846-irq-22.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "libretech,aml-s905x-cc-v2", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&spicc>; 20 | 21 | __overlay__ { 22 | 23 | touchscreen@0 { 24 | compatible = "ti,ads7846"; 25 | reg = <0>; 26 | spi-max-frequency = <2000000>; 27 | interrupt-parent = <&gpio_intc>; 28 | interrupts = ; 29 | pendown-gpio = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>; 30 | ti,x-plate-ohms = /bits/ 16 <60>; 31 | ti,pressure-max = /bits/ 16 <255>; 32 | wakeup-source; 33 | status = "okay"; 34 | }; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-1cs2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target-path = "/aliases"; 18 | 19 | __overlay__ { 20 | spi0 = "/soc/cbus@c1100000/spi@8d80"; 21 | }; 22 | }; 23 | 24 | fragment@1 { 25 | target = <&spicc>; 26 | 27 | __overlay__ { 28 | status = "okay"; 29 | pinctrl-0 = <&spi_pins>; 30 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 31 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 32 | pinctrl-names = "default", "idle-high", "idle-low"; 33 | 34 | cs-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_LOW>; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <41666667>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <2000000>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | wakeup-source; 52 | status = "okay"; 53 | }; 54 | }; 55 | }; 56 | }; 57 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <41666666>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <1302084>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | touchscreen-swapped-x-y; 52 | touchscreen-inverted-x; 53 | touchscreen-min-x = <180>; 54 | touchscreen-size-x = <3880>; 55 | touchscreen-min-y = <240>; 56 | touchscreen-size-y = <3940>; 57 | wakeup-source; 58 | status = "okay"; 59 | }; 60 | }; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spicc>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <20833333>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <1302084>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | ti,x-plate-ohms = /bits/ 16 <60>; 50 | ti,pressure-max = /bits/ 16 <255>; 51 | touchscreen-swapped-x-y; 52 | touchscreen-inverted-x; 53 | touchscreen-min-x = <300>; 54 | touchscreen-size-x = <3850>; 55 | touchscreen-min-y = <240>; 56 | touchscreen-size-y = <3900>; 57 | wakeup-source; 58 | status = "okay"; 59 | }; 60 | }; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable a spidev interface on SPICC bus with CS0 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&spicc>; 20 | 21 | __overlay__ { 22 | spidev@0 { 23 | compatible = "rohm,dh2228fv"; 24 | reg = <0>; 25 | spi-max-frequency = <41666666>; 26 | }; 27 | spidev@1 { 28 | compatible = "rohm,dh2228fv"; 29 | reg = <1>; 30 | spi-max-frequency = <41666666>; 31 | }; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-2cs.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable SPICC on Header 7J1 : 10 | * Pins 19 (MOSI), 21 (MISO), 23 (CLK), 24 (SS0) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | #include 18 | 19 | / { 20 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 21 | 22 | fragment@0 { 23 | target-path = "/aliases"; 24 | 25 | __overlay__ { 26 | spi0 = "/soc/cbus@c1100000/spi@8d80"; 27 | }; 28 | }; 29 | 30 | fragment@1 { 31 | target = <&spicc>; 32 | 33 | __overlay__ { 34 | status = "okay"; 35 | pinctrl-0 = <&spi_pins>; 36 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 37 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 38 | pinctrl-names = "default", "idle-high", "idle-low"; 39 | 40 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>, <&gpio GPIOX_1 GPIO_ACTIVE_LOW>; 41 | }; 42 | }; 43 | }; 44 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-cc-mosi-idle-low.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Internal SPI MOSI pull-down is insufficient for the default drive but this tries anyway. 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target = <&spi_pins>; 22 | 23 | __overlay__ { 24 | mux-1 { 25 | groups = "spi_mosi"; 26 | bias-pull-down; 27 | }; 28 | }; 29 | }; 30 | }; 31 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-1cs-ili9486.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | 4 | #include 5 | #include 6 | 7 | /* 8 | 32MHz Fmax 9 | 1,17 3.3V 3.3V 3.3V 10 | 2,4 5V 5V 5V 11 | 3,5,7,8,10,12,13,15,16 NC NC 12 | 6, 9, 14, 20, 25 GND Power ground 13 | 11 TP_IRQ GPIOAO_8 L The touch panel is interrupted, and it is detected that the touch panel is pressed low 14 | 18 LCD_RS GPIOX_15 H Instruction/data register selection, low level is instruction, high level is data 15 | 19 LCD_SI/TP_SI GPIOX_8 H LCD display / touch panel SPI data input 16 | 21 TP_SO GPIOX_9 H Touch panel SPI data output 17 | 22 RST GPIOX_0 H Reset signal, low reset 18 | 23 LCD_SCK/TP_SCK GPIOX_11 H LCD display / touch panel SPI clock signal 19 | 24 LCD_CS GPIOX_10 H LCD chip select signal, low level enable 20 | 26 TP_CS GPIOX_1 H Touch panel chip select signal, low level enable 21 | 22 | init = <0x10000f1 0x36 0x04 0x00 0x3c 0x0f 0x8f 0x10000f2 0x18 0xa3 0x12 0x02 0xb2 0x12 0xff 0x10 0x00 0x10000f8 0x21 0x04 0x10000f9 0x00 0x08 0x1000036 0x08 0x10000b4 0x00 0x10000c1 0x41 0x10000c5 0x00 0x91 0x80 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x100003a 0x55 0x1000011 0x1000036 0x28 0x20000ff 0x1000029>; 23 | interrupts = <0x11 0x02>; 24 | interrupt-parent = <0xdeadbeef>; 25 | */ 26 | 27 | / { 28 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 29 | 30 | fragment@0 { 31 | target = <&spigpio0>; 32 | 33 | __overlay__ { 34 | 35 | display@0 { 36 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 37 | reg = <0>; 38 | spi-max-frequency = <500000>; 39 | rotate = <0>; 40 | bgr = <0>; 41 | fps = <30>; 42 | buswidth = <8>; 43 | regwidth = <16>; 44 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 45 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 46 | status = "okay"; 47 | }; 48 | }; 49 | }; 50 | }; 51 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | 4 | #include 5 | #include 6 | 7 | / { 8 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 9 | 10 | fragment@0 { 11 | target = <&spigpio0>; 12 | 13 | __overlay__ { 14 | spidev@0 { 15 | compatible = "rohm,dh2228fv"; 16 | reg = <0>; 17 | spi-max-frequency = <500000>; 18 | }; 19 | }; 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target-path = "/"; 18 | 19 | __overlay__ { 20 | spigpio0: spigpio@0 { 21 | compatible = "spi-gpio"; 22 | #address-cells = <1>; 23 | #size-cells = <0>; 24 | ranges; 25 | 26 | pinctrl-0 = <&spi_pins>; 27 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 28 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 29 | pinctrl-names = "default", "idle-high", "idle-low"; 30 | 31 | gpio-sck = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>; 32 | gpio-miso = <&gpio GPIOX_9 GPIO_ACTIVE_HIGH>; 33 | gpio-mosi = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>; 34 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>; 35 | num-chipselects = <1>; 36 | status = "okay"; 37 | }; 38 | 39 | }; 40 | }; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | / { 16 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 17 | 18 | fragment@0 { 19 | target = <&cec_AO>; 20 | 21 | __overlay__ { 22 | status = "disabled"; 23 | }; 24 | }; 25 | 26 | fragment@1 { 27 | target = <&spigpio0>; 28 | 29 | __overlay__ { 30 | 31 | display@0 { 32 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 33 | reg = <0>; 34 | spi-max-frequency = <30000000>; 35 | reset-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>; 36 | dc-gpios = <&gpio GPIOX_15 GPIO_ACTIVE_HIGH>; 37 | status = "okay"; 38 | }; 39 | 40 | touchscreen@1 { 41 | compatible = "ti,ads7846"; 42 | pinctrl-names = "default"; 43 | pinctrl-0 = <&ao_cec_pins>; 44 | reg = <1>; 45 | spi-max-frequency = <2000000>; 46 | interrupt-parent = <&gpio_intc>; 47 | interrupts = ; 48 | pendown-gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_LOW>; 49 | wakeup-source; 50 | status = "okay"; 51 | }; 52 | }; 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target = <&spigpio0>; 18 | 19 | __overlay__ { 20 | spidev@0 { 21 | compatible = "rohm,dh2228fv"; 22 | reg = <0>; 23 | spi-max-frequency = <1000000>; 24 | }; 25 | spidev@1 { 26 | compatible = "rohm,dh2228fv"; 27 | reg = <1>; 28 | spi-max-frequency = <1000000>; 29 | }; 30 | }; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spi-gpio-2cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2022 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | #include 11 | #include 12 | 13 | / { 14 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 | 16 | fragment@0 { 17 | target-path = "/"; 18 | 19 | __overlay__ { 20 | spigpio0: spigpio@0 { 21 | compatible = "spi-gpio"; 22 | #address-cells = <1>; 23 | #size-cells = <0>; 24 | ranges; 25 | 26 | pinctrl-0 = <&spi_pins>; 27 | pinctrl-1 = <&spi_pins>, <&spi_idle_high_pins>; 28 | pinctrl-2 = <&spi_pins>, <&spi_idle_low_pins>; 29 | pinctrl-names = "default", "idle-high", "idle-low"; 30 | 31 | gpio-sck = <&gpio GPIOX_11 GPIO_ACTIVE_HIGH>; 32 | gpio-miso = <&gpio GPIOX_9 GPIO_ACTIVE_HIGH>; 33 | gpio-mosi = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>; 34 | cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>, <&gpio GPIOX_1 GPIO_ACTIVE_LOW>; 35 | num-chipselects = <2>; 36 | status = "okay"; 37 | }; 38 | 39 | }; 40 | }; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-ce1-ads7846-irq-22.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs2-ads7846-irq-22.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-ce1.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs2.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-cs1-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-cs1-mhs3528.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs-mhs3528.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-cs1-mpi3501.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs-mpi3501.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-cs1-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-cc-2cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-ili9341.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-ili9341.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-ili9486.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-ili9486.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-mcp2515-can0.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-mcp2515-can0.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-mcp2515-dual-can.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-mcp2515-can-dual.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-mcp3008.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-mcp3008.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-ssd1306-128x64.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-ssd1306-128x64.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-st7735r-128x128-legacy.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-st7735r-128x128-fbdev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-st7735r-128x128.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-st7735r-128x128.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-st7789v-240x240.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-st7789v-240x240.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc-st7789v-240x320-legacy.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs-st7789v-240x320-fbdev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spicc.dts: -------------------------------------------------------------------------------- 1 | spi-cc-1cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio-cs1-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio-cs1-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-2cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-2cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio-ili9486.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-1cs-ili9486.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-1cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/spigpio.dts: -------------------------------------------------------------------------------- 1 | spi-gpio-1cs.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uart-a-clk81.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable UART_A on Header 7J1 : 10 | * Pins 8 (TX), 10 (RX), 16 (CTS), 18 (RTS) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | 24 | __overlay__ { 25 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 26 | }; 27 | }; 28 | 29 | fragment@1 { 30 | target = <&uart_A>; 31 | 32 | __overlay__ { 33 | status = "okay"; 34 | pinctrl-0 = <&uart_a_pins>; 35 | pinctrl-names = "default"; 36 | clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>; 37 | clock-names = "xtal", "pclk", "baud"; 38 | }; 39 | }; 40 | }; 41 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uart-a-rts-cts-clk81.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable UART_A on Header 7J1 : 10 | * Pins 8 (TX), 10 (RX), 16 (CTS), 18 (RTS) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 20 | 21 | fragment@0 { 22 | target-path = "/aliases"; 23 | 24 | __overlay__ { 25 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 26 | }; 27 | }; 28 | 29 | fragment@1 { 30 | target = <&uart_A>; 31 | 32 | __overlay__ { 33 | status = "okay"; 34 | pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 35 | pinctrl-names = "default"; 36 | uart-has-rtscts; 37 | clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>; 38 | clock-names = "xtal", "pclk", "baud"; 39 | }; 40 | }; 41 | }; 42 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uart-a-rts-cts.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable UART_A on Header 7J1 : 10 | * Pins 8 (TX), 10 (RX), 16 (CTS), 18 (RTS) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | / { 17 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&uart_A>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 33 | pinctrl-names = "default"; 34 | uart-has-rtscts; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uart-a.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 BayLibre, SAS. 3 | * Author: Neil Armstrong 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable UART_A on Header 7J1 : 10 | * Pins 8 (TX), 10 (RX), 16 (CTS), 18 (RTS) 11 | */ 12 | 13 | /dts-v1/; 14 | /plugin/; 15 | 16 | / { 17 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 18 | 19 | fragment@0 { 20 | target-path = "/aliases"; 21 | 22 | __overlay__ { 23 | serial1 = "/soc/cbus@c1100000/serial@84c0"; 24 | }; 25 | }; 26 | 27 | fragment@1 { 28 | target = <&uart_A>; 29 | 30 | __overlay__ { 31 | status = "okay"; 32 | pinctrl-0 = <&uart_a_pins>; 33 | pinctrl-names = "default"; 34 | }; 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uart-ao-b.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Da Xue 3 | * Author: Da Xue 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * UART_AO_B on Header 7J1 up to 921600 baud with no flow control 10 | * Pin 3 Incoming (RX) 11 | * Pin 5 Outgoing (TX) 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | / { 18 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | serial2 = "/soc/bus@c8100000/serial@4e0"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&uart_AO_B>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | pinctrl-0 = <&uart_ao_b_pins>; 34 | pinctrl-names = "default"; 35 | }; 36 | }; 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uarta-clk81.dts: -------------------------------------------------------------------------------- 1 | uart-a-rts-cts-clk81.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/uarta.dts: -------------------------------------------------------------------------------- 1 | uart-a-rts-cts.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/usb-device-mode.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /dts-v1/; 8 | /plugin/; 9 | 10 | / { 11 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 12 | 13 | fragment@0 { 14 | target = <&usb>; 15 | 16 | __overlay__ { 17 | dr_mode = "peripheral"; 18 | }; 19 | }; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/w1-gpio-7j1-7.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Thomas McKahan 3 | * Author: Thomas McKahan 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay to enable 1-wire on gpio "4" (BCM) 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | / { 19 | compatible = "libretech,aml-s905x-cc", "amlogic,s905x", "amlogic,meson-gxl"; 20 | 21 | fragment@0 { 22 | target-path = "/"; 23 | __overlay__ { 24 | onewire@0 { 25 | compatible = "w1-gpio"; 26 | gpios = <&gpio GPIOCLK_0 GPIO_ACTIVE_HIGH>; 27 | status = "okay"; 28 | }; 29 | }; 30 | }; 31 | }; 32 | -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/dt/w1-gpio.dts: -------------------------------------------------------------------------------- 1 | w1-gpio-7j1-7.dts -------------------------------------------------------------------------------- /libre-computer/aml-s905x-cc/gpio.config: -------------------------------------------------------------------------------- 1 | GPIO_DEBUG_PATH=vendor/aml/gxl/gpio_debug 2 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc-v2/dt: -------------------------------------------------------------------------------- 1 | ../roc-rk3328-cc/dt -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc-v2/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=rockchip/rk3328-roc-cc-v2.dtb 3 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc-v2/dt.map: -------------------------------------------------------------------------------- 1 | ../roc-rk3328-cc/dt.map -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc-v2/gpio.map: -------------------------------------------------------------------------------- 1 | ../roc-rk3328-cc/gpio.map -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=rockchip/rk3328-roc-cc.dtb -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt.map: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | # I2C 4 | H40P_I2C_0 i2c-0 5 | H40P_I2C_0_SSD1306_128x32 i2c-0-ssd1306-128x32 6 | H40P_I2C_0_SSD1306_128x64 i2c-0-ssd1306-128x64 7 | H40P_I2C_1 i2c-1 8 | H40P_I2C_1_SSD1306_128x32 i2c-1-ssd1306-128x32 9 | H40P_I2C_1_SSD1306_128x64 i2c-1-ssd1306-128x64 10 | # SPI 11 | H40P_SPI_0_1CS spi-0-1cs 12 | H40P_SPI_0_1CS_DEV spi-0-1cs-spidev 13 | H40P_SPI_0_2CS spi-0-2cs 14 | H40P_SPI_0_2CS_DEV spi-0-2cs-spidev 15 | H40P_SPI_0_2CS_LCD_35 spi-0-2cs-ili9486-xpt2046 16 | H40P_SPI_0_2CS_LCD_35_MPI3501 spi-0-2cs-mpi3501 17 | H40P_SPI_0_2CS_LCD_35_MHS3528 spi-0-2cs-mhs3528 18 | # UART 19 | H40P_UART_0 uart-1 20 | H40P_UART_DEBUG uart-2 21 | #PWM 22 | H40P_PWM_P12 pwm-2 23 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/i2c-0.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables I2C0 on 40P header J1 pins 3 (SDA) and 5 (SCL) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 16 | 17 | fragment@0 { 18 | target = <&i2c0>; 19 | __overlay__ { 20 | status = "okay"; 21 | }; 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/i2c0.dts: -------------------------------------------------------------------------------- 1 | i2c-0.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/pps-gpio-j1-28.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2023 Jaime Jackson-Block 4 | * Author: Jaime Jackson-Block 5 | */ 6 | 7 | /* 8 | * Enables soft PPS on 40P header J1 pin 28 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | /* 18 | * 7 1-28 CLKOUT GPIO1_D4 19 | */ 20 | 21 | / { 22 | compatible = "rockchip,rk3328"; 23 | 24 | fragment@0 { 25 | target-path = "/"; 26 | 27 | __overlay__ { 28 | pps_gpio: pps-gpio { 29 | compatible = "pps-gpio"; 30 | pinctrl-names = "default"; 31 | gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>; 32 | assert-rising-edge; 33 | status = "okay"; 34 | }; 35 | }; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/pwm-2-fan.dts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 Matthew Chandler 3 | * Author: Matthew Chandler 4 | * 5 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 | */ 7 | 8 | /* 9 | * Overlay aimed to enable fan on PWM 2 on 40P header Pin 12 with tach on 40P header Pin 11 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | 18 | /* 19 | * 11 TPIRQ GPIO2_C4 20 | */ 21 | 22 | / { 23 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 24 | 25 | fragment@0 { 26 | target = <&i2s1_sdio1>; 27 | __overlay__ { 28 | mux { 29 | bias-pull-up; 30 | }; 31 | }; 32 | }; 33 | 34 | fragment@1 { 35 | target-path = "/"; 36 | __overlay__ { 37 | fan0: pwm-fan { 38 | compatible = "pwm-fan"; 39 | pwms = <&pwm2 0 25000 0>; 40 | interrupt-parent = <&gpio2>; 41 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 42 | pulses-per-revolution = <2>; 43 | }; 44 | }; 45 | }; 46 | }; 47 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/pwm-2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables PWM on 40P header J1 pin 12 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 16 | 17 | fragment@0 { 18 | target = <&pwm2>; 19 | __overlay__ { 20 | status = "okay"; 21 | }; 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/pwm2.dts: -------------------------------------------------------------------------------- 1 | pwm-2.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/saradc.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SARADC on 3P header J21 pins 1 (IN1) and 3 (IN0) 9 | * This overlay will not be necessary in the future as it will be integrated with the base tree. 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 17 | 18 | fragment@0 { 19 | target = <&saradc>; 20 | __overlay__ { 21 | vref-supply = <&vcc_18>; 22 | }; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-1cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables spidev interfaces for spi-0-1cs 9 | * Requires spi-0-1cs overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 17 | 18 | fragment@0 { 19 | target = <&spi0>; 20 | 21 | __overlay__ { 22 | spidev@0 { 23 | compatible = "rohm,dh2228fv"; 24 | reg = <0>; 25 | spi-max-frequency = <30000000>; 26 | }; 27 | }; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-1cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPI on 40P header J1 pins 19 (TX) 21 (RX) 23 (CLK) with chip select on pins 24 (CS0) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | spi0 = "/soc/spi@ff190000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spi0>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | num-cs = <1>; 34 | }; 35 | }; 36 | }; 37 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-2cs-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables ILI9486 based 3.5" touchscreen on 40P header J1 without tuning parameters 9 | * Requires spi0-cs1 overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | /* 20 | * 11 TPIRQ GPIO2_C4 21 | * 18 I/D R GPIO3_A5 22 | * 22 Reset GPIO0_A2 23 | */ 24 | 25 | / { 26 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 27 | 28 | fragment@0 { 29 | target = <&spi0>; 30 | 31 | __overlay__ { 32 | 33 | display@0 { 34 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 35 | reg = <0>; 36 | spi-max-frequency = <30000000>; 37 | reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 38 | dc-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; 39 | status = "okay"; 40 | }; 41 | 42 | touchscreen@1 { 43 | compatible = "ti,ads7846"; 44 | reg = <1>; 45 | pinctrl-names = "default"; 46 | pinctrl-0 = <&i2s1_sdio1>; 47 | spi-max-frequency = <2000000>; 48 | interrupt-parent = <&gpio2>; 49 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 50 | pendown-gpio = <&gpio2 RK_PC4 GPIO_ACTIVE_LOW>; 51 | ti,x-plate-ohms = /bits/ 16 <60>; 52 | ti,pressure-max = /bits/ 16 <255>; 53 | wakeup-source; 54 | status = "okay"; 55 | }; 56 | }; 57 | }; 58 | }; 59 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-2cs-mhs3528.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables ILI9486 based 3.5" touchscreen on 40P header J1 with tuning for MHS3528 9 | * Requires spi0-cs1 overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | /* 20 | * 11 TPIRQ GPIO2_C4 21 | * 18 I/D R GPIO3_A5 22 | * 22 Reset GPIO0_A2 23 | */ 24 | 25 | / { 26 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 27 | 28 | fragment@0 { 29 | target = <&spi0>; 30 | 31 | __overlay__ { 32 | 33 | display@0 { 34 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 35 | reg = <0>; 36 | spi-max-frequency = <30000000>; 37 | reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 38 | dc-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; 39 | status = "okay"; 40 | }; 41 | 42 | touchscreen@1 { 43 | compatible = "ti,ads7846"; 44 | pinctrl-names = "default"; 45 | pinctrl-0 = <&i2s1_sdio1>; 46 | reg = <1>; 47 | spi-max-frequency = <2000000>; 48 | interrupt-parent = <&gpio2>; 49 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 50 | pendown-gpio = <&gpio2 RK_PC4 GPIO_ACTIVE_LOW>; 51 | ti,x-plate-ohms = /bits/ 16 <60>; 52 | ti,pressure-max = /bits/ 16 <255>; 53 | touchscreen-swapped-x-y; 54 | touchscreen-inverted-x; 55 | touchscreen-min-x = <180>; 56 | touchscreen-size-x = <3880>; 57 | touchscreen-min-y = <240>; 58 | touchscreen-size-y = <3940>; 59 | wakeup-source; 60 | status = "okay"; 61 | }; 62 | }; 63 | }; 64 | }; 65 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-2cs-mpi3501.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | * 6 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 | */ 8 | 9 | /* 10 | * Enables ILI9486 based 3.5" touchscreen on 40P header J1 with tuning for MPI3501 11 | * Requires spi0-cs1 overlay 12 | */ 13 | 14 | /dts-v1/; 15 | /plugin/; 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | /* 22 | * 11 TPIRQ GPIO2_C4 23 | * 18 I/D R GPIO3_A5 24 | * 22 Reset GPIO0_A2 25 | */ 26 | 27 | / { 28 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 29 | 30 | fragment@0 { 31 | target = <&spi0>; 32 | 33 | __overlay__ { 34 | 35 | display@0 { 36 | compatible = "waveshare,rpi-lcd-35", "ilitek,ili9486"; 37 | reg = <0>; 38 | spi-max-frequency = <30000000>; 39 | reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 40 | dc-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; 41 | status = "okay"; 42 | }; 43 | 44 | touchscreen@1 { 45 | compatible = "ti,ads7846"; 46 | pinctrl-names = "default"; 47 | pinctrl-0 = <&i2s1_sdio1>; 48 | reg = <1>; 49 | spi-max-frequency = <2000000>; 50 | interrupt-parent = <&gpio2>; 51 | interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 52 | pendown-gpio = <&gpio2 RK_PC4 GPIO_ACTIVE_LOW>; 53 | ti,x-plate-ohms = /bits/ 16 <60>; 54 | ti,pressure-max = /bits/ 16 <255>; 55 | touchscreen-swapped-x-y; 56 | touchscreen-inverted-x; 57 | touchscreen-min-x = <300>; 58 | touchscreen-size-x = <3850>; 59 | touchscreen-min-y = <240>; 60 | touchscreen-size-y = <3900>; 61 | wakeup-source; 62 | status = "okay"; 63 | }; 64 | }; 65 | }; 66 | }; 67 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-2cs-spidev.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables spidev interfaces for spi-0-2cs 9 | * Requires spi-0-2cs overlay 10 | */ 11 | 12 | /dts-v1/; 13 | /plugin/; 14 | 15 | / { 16 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 17 | 18 | fragment@0 { 19 | target = <&spi0>; 20 | 21 | __overlay__ { 22 | spidev@0 { 23 | compatible = "rohm,dh2228fv"; 24 | reg = <0>; 25 | spi-max-frequency = <30000000>; 26 | }; 27 | spidev@1 { 28 | compatible = "rohm,dh2228fv"; 29 | reg = <1>; 30 | spi-max-frequency = <30000000>; 31 | }; 32 | }; 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0-2cs.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPI on 40P header J1 pins 19 (TX) 21 (RX) 23 (CLK) with two chip selects on pins 24 (CS0) 26 (CS1) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | #include 15 | #include 16 | 17 | / { 18 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 19 | 20 | fragment@0 { 21 | target-path = "/aliases"; 22 | 23 | __overlay__ { 24 | spi0 = "/soc/spi@ff190000"; 25 | }; 26 | }; 27 | 28 | fragment@1 { 29 | target = <&spi0>; 30 | 31 | __overlay__ { 32 | status = "okay"; 33 | num-cs = <2>; 34 | pinctrl-names = "default", "default"; 35 | pinctrl-1 = <&spi0m0_cs1>; 36 | cs-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>, <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>; 37 | }; 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi-0.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables SPI on 40P header J1 pins 19 (TX) 21 (RX) 23 (CLK) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 16 | 17 | fragment@0 { 18 | target-path = "/aliases"; 19 | 20 | __overlay__ { 21 | spi0 = "/soc/spi@ff190000"; 22 | }; 23 | }; 24 | 25 | fragment@1 { 26 | target = <&spi0>; 27 | 28 | __overlay__ { 29 | status = "okay"; 30 | }; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0-cs1-ili9486-xpt2046.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-ili9486-xpt2046.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0-cs1-mhs3528.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-mhs3528.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0-cs1-mpi3501.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-mpi3501.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0-cs1-spidev.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs-spidev.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0-cs1.dts: -------------------------------------------------------------------------------- 1 | spi-0-2cs.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/spi0.dts: -------------------------------------------------------------------------------- 1 | spi-0.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/uart-1.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART1 on 40P header J1 pins 8 (TX) and 10 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 16 | 17 | fragment@0 { 18 | target = <&uart1>; 19 | __overlay__ { 20 | status = "okay"; 21 | }; 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/uart-2.dts: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 | /* 3 | * Copyright (c) 2024 Da Xue 4 | * Author: Da Xue 5 | */ 6 | 7 | /* 8 | * Enables UART2 on 40P header J1 pins 36 (TX) and 38 (RX) 9 | */ 10 | 11 | /dts-v1/; 12 | /plugin/; 13 | 14 | / { 15 | compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328"; 16 | 17 | fragment@0 { 18 | target = <&uart2>; 19 | __overlay__ { 20 | status = "okay"; 21 | }; 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/uart1.dts: -------------------------------------------------------------------------------- 1 | uart-1.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3328-cc/dt/uart2.dts: -------------------------------------------------------------------------------- 1 | uart-2.dts -------------------------------------------------------------------------------- /libre-computer/roc-rk3399-pc/dt.config: -------------------------------------------------------------------------------- 1 | DT_OVERRIDE_PATH=dtb 2 | DT_OVERRIDE=rockchip/rk3399-roc-pc.dtb -------------------------------------------------------------------------------- /libre-computer/roc-rk3399-pc/dt/mezzanine.dts: -------------------------------------------------------------------------------- 1 | /dts-v1/; 2 | /plugin/; 3 | 4 | / { 5 | compatible = "libre-computer,roc-rk3399-pc", "rockchip,rk3399"; 6 | 7 | 8 | fragment@0 { 9 | target-path = "/aliases"; 10 | 11 | __overlay__ { 12 | mmc2 = <&sdio0>; 13 | }; 14 | }; 15 | 16 | fragment@1 { 17 | target = <&sdio0>; 18 | __overlay__ { 19 | bus-width = <4>; 20 | cap-sd-highspeed; 21 | cap-sdio-irq; 22 | keep-power-in-suspend; 23 | mmc-pwrseq = <&sdio_pwrseq>; 24 | pinctrl-names = "default"; 25 | pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; 26 | sd-uhs-sdr104; 27 | vmmc-supply = <&vcc3v3_ngff>; 28 | vqmmc-supply = <&vcc_1v8>; 29 | status = "okay"; 30 | }; 31 | }; 32 | 33 | fragment@2 { 34 | target = <&uart0>; 35 | __overlay__ { 36 | pinctrl-names = "default"; 37 | pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; 38 | status = "okay"; 39 | }; 40 | }; 41 | 42 | }; -------------------------------------------------------------------------------- /test/dt_map_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-License-Identifier: GPL-2.0 3 | # Copyright (C) 2021 Da Xue 4 | 5 | set -e 6 | 7 | cd $(readlink -f $(dirname ${BASH_SOURCE[0]})) 8 | 9 | dt_maps=../libre-computer/*/dt.map 10 | 11 | for dt_map in $dt_maps; do 12 | dt_overlays=$(grep -v "^#" $dt_map | cut -f 2 -d " ") 13 | for dt_overlay in $dt_overlays; do 14 | dt_overlay_src="${dt_map%.map}/$dt_overlay.dts" 15 | if [ ! -f "$dt_overlay_src" ]; then 16 | echo "$dt_overlay_src Missing!" 17 | fi 18 | done 19 | done 20 | -------------------------------------------------------------------------------- /test/spi/bench-xfer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2025 Da Xue 3 | # SPDX-License-Identifier: MIT 4 | 5 | cd $(dirname $(readlink -f "${BASH_SOURCE[0]}")) 6 | 7 | . bench_include.sh 8 | 9 | if [ ! -z "$1" ]; then 10 | if [ "$1" = "--help" ]; then 11 | echo "$0 \"spi_bpws\" spi_speed" >&2 12 | exit 1 13 | fi 14 | spi_bpws=$1 15 | else 16 | spi_bpws=$SPI_BPWS 17 | fi 18 | 19 | if [ ! -z "$2" ]; then 20 | spi_speed=$2 21 | else 22 | spi_speed=$SPI_SPEED_DEFAULT 23 | fi 24 | 25 | . board_include.sh 26 | 27 | spi_mode=32 28 | ret=0 29 | 30 | ts_start=64 31 | ts_incre=8 32 | 33 | echo "Target Speed: $spi_speed" >&2 34 | spi_clock_monitor 35 | 36 | for spi_bpw in $spi_bpws; do 37 | spi_bpw_fail=0 38 | spi_Bpw=$((spi_bpw >> 3)) 39 | ts_start=$spi_bpw #$(((spi_bpw << 3) >> 3)) 40 | ts_incre=$((spi_bpw >> 3)) 41 | for transfer_size in $(seq $ts_start $ts_incre $MAX_CHUNK_SIZE); do 42 | spi_chunk_size=$((transfer_size < MAX_CHUNK_SIZE ? transfer_size : MAX_CHUNK_SIZE)) 43 | cmd="$BENCH_BIN $spi_device $spi_speed $spi_bpw $spi_mode $transfer_size $spi_chunk_size" 44 | output=$($cmd 2>&1) 45 | if [ $? -ne 0 ]; then 46 | echo 47 | echo -e "$cmd #" 48 | echo -e "\r${transfer_size}B @ ${spi_bpw}b/w failed" 49 | echo "$output" >&2 50 | spi_bpw_fail=1 51 | if [ ! -z "$EXIT_ON_FAIL" ] && [ "$EXIT_ON_FAIL" -eq 1 ]; then 52 | exit 1 53 | fi 54 | else 55 | spi_clock_monitor_wait 56 | throughput=$(echo "$output" | grep "Throughput:" | awk '{print $2}') 57 | echo -en "\r${transfer_size}B @ ${throughput}MHz ${spi_bpw}b/w" 58 | fi 59 | done 60 | if [ $spi_bpw_fail -eq 0 ]; then 61 | echo -e "\r$spi_bpw b/w PASS" 62 | else 63 | echo -e "$spi_bpw b/w FAIL" 64 | ret=1 65 | fi 66 | done 67 | 68 | exit $ret 69 | -------------------------------------------------------------------------------- /test/spi/bench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2025 Da Xue 3 | # SPDX-License-Identifier: MIT 4 | 5 | cd $(dirname $(readlink -f "${BASH_SOURCE[0]}")) 6 | 7 | . bench_include.sh 8 | . board_include.sh 9 | 10 | if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then 11 | echo "$0 SPEED BPW MODE SIZE CHUNK" >&2 12 | exit 1 13 | fi 14 | 15 | board_clock_display(){ 16 | if [ ! -z "$board_clock" ]; then 17 | spi_clock_monitor_clk_tree $board_clock 18 | fi 19 | trap - SIGUSR1 20 | wait -f $pid 21 | } 22 | 23 | bench_kill(){ 24 | if [ ! -z "$pid" ]; then 25 | kill -TERM $pid 26 | fi 27 | } 28 | 29 | trap board_clock_display SIGUSR1 30 | trap bench_kill SIGINT 31 | trap bench_kill SIGTERM 32 | 33 | PARENT_USR1=1 $BENCH_BIN "$spi_device" $@ & 34 | pid=$! 35 | wait -f $pid 36 | -------------------------------------------------------------------------------- /test/spi/board_include.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2025 Da Xue 2 | # SPDX-License-Identifier: MIT 3 | 4 | DMI_BOARDNAME_PATH=/sys/class/dmi/id/board_name 5 | DEV_PATH=/dev 6 | SPI_DEV_NAME=spidev 7 | SPI_DEV_PATH=$DEV_PATH/$SPI_DEV_NAME 8 | 9 | if [ -e "$DMI_BOARDNAME_PATH" ]; then 10 | board=$(cat "$DMI_BOARDNAME_PATH") 11 | case $board in 12 | aml-s805x-ac | aml-s905x-cc | aml-s905x-cc-v2 | aml-s905d-pc) 13 | spi_devnum=0 14 | board_clock="c1108d80.spi#pow2_div" 15 | spi_speed_max=41666666 16 | spi_speed_min=325521 17 | spi_words_max=1024 18 | ;; 19 | aml-a311d-cc | aml-s905d3-cc) 20 | spi_devnum=1 21 | board_clock="ffd15000.spi#sel" 22 | spi_speed_max=166666664 23 | spi_speed_min=50000 24 | spi_words_max=524280 25 | ;; 26 | *) 27 | spi_devnum=$(find $DEV_PATH -maxdepth 1 -iname $SPI_DEV_NAME\*.0 | head -n 1) 28 | board_clock= 29 | if [ -z $spi_devnum ]; then 30 | echo "Unable to find $SPI_DEV_NAME in $DEV_PATH!" >&2 31 | exit 1 32 | else 33 | spi_devnum=${spi_devnum#$SPI_DEV_PATH} 34 | spi_devnum=${spi_devnum%\.*} 35 | fi 36 | spi_speed_max=0 37 | spi_speed_min=0 38 | ;; 39 | esac 40 | fi 41 | 42 | if [ ! -z "$spi_devnum_user" ]; then 43 | spi_devnum=$spi_devnum_user 44 | fi 45 | 46 | spi_device="$SPI_DEV_PATH${spi_devnum}.0" 47 | if [ "$spi_speed_max" -eq 0 ]; then 48 | spi_speeds=(${SPI_SPEEDS[@]}) 49 | else 50 | spi_speeds=() 51 | for i in "${SPI_SPEEDS[@]}"; do 52 | if [ "$i" -ge "$spi_speed_min" ] && [ "$i" -le "$spi_speed_max" ]; then 53 | spi_speeds+=($i) 54 | spi_speed_last=$i 55 | fi 56 | done 57 | if [ $spi_speed_last -lt $spi_speed_max ]; then 58 | spi_speeds+=($spi_speed_max) 59 | fi 60 | fi 61 | 62 | if [ ! -c "$spi_device" ]; then 63 | echo "spi_device $spi_device does not exist" >&2 64 | exit 1 65 | fi 66 | 67 | if [ ! -w "$spi_device" ]; then 68 | echo "spi_device $spi_device is not writable. sudo?" >&2 69 | exit 1 70 | fi 71 | --------------------------------------------------------------------------------