From d339f6fe16917efe2bb64c639e93e7ea780ddddf Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 3 Sep 2024 17:06:38 +0200 Subject: [PATCH] build tooling --- alt-trees/README.md | 26 +- alt-trees/general/README.md | 33 - alt-trees/serial/mq-pro-serial.dts | 1297 ----------------- alt-trees/serial/mqpro-serial.dts | 319 ++++ alt-trees/spi/mq-pro-spi.dts | 1290 ---------------- alt-trees/{spi => spi_i2c}/README.md | 14 +- .../mqpro-spi-i2c.dts} | 173 ++- build-trees/make_dtb.sh | 2 +- 8 files changed, 482 insertions(+), 2672 deletions(-) delete mode 100644 alt-trees/general/README.md delete mode 100644 alt-trees/serial/mq-pro-serial.dts create mode 100644 alt-trees/serial/mqpro-serial.dts delete mode 100644 alt-trees/spi/mq-pro-spi.dts rename alt-trees/{spi => spi_i2c}/README.md (73%) rename alt-trees/{general/mq-pro-general.dts => spi_i2c/mqpro-spi-i2c.dts} (55%) diff --git a/alt-trees/README.md b/alt-trees/README.md index 62245d5..ddf31eb 100644 --- a/alt-trees/README.md +++ b/alt-trees/README.md @@ -5,25 +5,23 @@ Copy the desired `.dts` file to the [build-trees](../build-trees) folder and fol There are instructions at the end of that document on how you can use a custom `.dtb` and make it permanent across reboots and kernel upgrades. -The issue with using these trees is that **if** the upstream device tree or includes is modified you need to manually rebuild these trees. +The issue with using these trees is that **if** the upstream device tree or includes is modified you need to manually rebuild these trees. EG any changes to the upstream `sun20i-d1-mangopi-mq-pro.dts` source needs to be detected and applied too. You need to examine file histories to do this. - Fortunately this should not be an issue in practice; the kernel *should* remain very stable going forward. Ubuntu 24.04.1 is a LTS release.. The authors personal advice is to use this only if needed; or as a learning excercise. -## Common -[A common (generic) device tree I, suitable for many occasions](./common) -* Has 2x UART (plus the console uart), 2x I2C. 1xSPI -* 12 unassigned GPIO pins +## SPI and I2C +[SPI plus I2C interfaces](./spi_i2c) +* 1x SPI +* 4x I2C +* 3x UART (plus the console uart) +* 6 unassigned GPIO pins ## Serial -[Four UART interfaces *and* Four I2C interfaces](./serial) -* Has 4x UART (plus the console uart), 4x I2C -* UART3 has RTC/CTS pins available too -* 10 unassigned GPIO pins - -## SPI -[SPI plus Serial interfaces](./spi) -* Has 3x UART (plus the console uart), 3x I2C. 1xSPI -* 8 unassigned GPIO pins +[Four UART interfaces](./serial) +* 4x UART (plus the console uart) + * UART3 has RTC/CTS pins available too +* 2x I2C +* 12 unassigned GPIO pins diff --git a/alt-trees/general/README.md b/alt-trees/general/README.md deleted file mode 100644 index 4d9e1dd..0000000 --- a/alt-trees/general/README.md +++ /dev/null @@ -1,33 +0,0 @@ -``` - MangoPI MQ Pro GPIO header (dtb name: MangoPi MQ Pro) - -Gpio Header: - func des pin pin des func - 3v3 1 --o o-- 2 5v - i2c0.sda (2502000.i2c:205) PG13 3 --o o-- 4 5v - i2c0.sck (2502000.i2c:204) PG12 5 --o o-- 6 gnd - free (39) PB7 7 --o o-- 8 PB8 uart0.tx (2500000.serial:40) - gnd 9 --o o-- 10 PB9 uart0.rx (2500000.serial:41) - free (117) PD21 11 --o o-- 12 PB5 free (37) - free (118) PD22 13 --o o-- 14 gnd - free (32) PB0 15 --o o-- 16 PB1 free (33) - 3v3 17 --o o-- 18 PD14 spi1.hold (4026000.spi:110) - spi1.mosi (4026000.spi:108) PD12 19 --o o-- 20 gnd - spi1.miso (4026000.spi:109) PD13 21 --o o-- 22 PC1 uart2.rx (2500800.serial:65) - spi1.clk (4026000.spi:107) PD11 23 --o o-- 24 PD10 spi1.cs (4026000.spi:106) - gnd 25 --o o-- 26 PD15 spi1.wp (4026000.spi:111) - i2c3.sda (2502c00.i2c:145) PE17 27 --o o-- 28 PE16 i2c3.sck (2502c00.i2c:144) - free (42) PB10 29 --o o-- 30 gnd - free (43) PB11 31 --o o-- 32 PC0 uart2.tx (2500800.serial:64) - free (44) PB12 33 --o o-- 34 gnd - free (38) PB6 35 --o o-- 36 PB2 uart4.tx (2501000.serial:34) - free (113) PD17 37 --o o-- 38 PB3 uart4.rx (2501000.serial:35) - gnd 39 --o o-- 40 PB4 free (36) - -Other gpio outputs of interest: --- PD18: Blue Status Led - gpio (2000000.pinctrl:114) - -Notes: -- I2C pins 3,5,27 and 28 (PG13, PG12, PE17 and PE16) have 10K pullup resistors to 3v3 -- The Status LED (PD18) is common with the LED_PWM pin on the DSI/LVDS output -``` diff --git a/alt-trees/serial/mq-pro-serial.dts b/alt-trees/serial/mq-pro-serial.dts deleted file mode 100644 index 0b20e5e..0000000 --- a/alt-trees/serial/mq-pro-serial.dts +++ /dev/null @@ -1,1297 +0,0 @@ -/dts-v1/; - -/ { - #address-cells = <0x01>; - model = "MangoPi MQ Pro"; - #size-cells = <0x01>; - compatible = "widora,mangopi-mq-pro\0allwinner,sun20i-d1"; - - connector { - type = "c"; - compatible = "hdmi-connector"; - - port { - - endpoint { - remote-endpoint = <0x3f>; - phandle = <0x3c>; - }; - }; - }; - - avdd2v8 { - regulator-max-microvolt = <0x2ab980>; - regulator-min-microvolt = <0x2ab980>; - regulator-name = "avdd2v8"; - compatible = "regulator-fixed"; - phandle = <0x0c>; - vin-supply = <0x0b>; - }; - - vdd-cpu { - regulator-max-microvolt = <0x10c8e0>; - regulator-min-microvolt = <0x10c8e0>; - regulator-name = "vdd-cpu"; - compatible = "regulator-fixed"; - phandle = <0x02>; - vin-supply = <0x22>; - }; - - wifi-pwrseq { - reset-gpios = <0x15 0x06 0x11 0x01>; - compatible = "mmc-pwrseq-simple"; - phandle = <0x1f>; - }; - - thermal-zones { - - cpu-thermal { - polling-delay = <0x00>; - polling-delay-passive = <0x00>; - thermal-sensors = <0x05>; - - trips { - - cpu-crit { - temperature = <0x1adb0>; - hysteresis = <0x00>; - type = "critical"; - }; - - cpu-target { - temperature = <0x14c08>; - hysteresis = <0xbb8>; - type = "passive"; - phandle = <0x06>; - }; - }; - - cooling-maps { - - map0 { - trip = <0x06>; - cooling-device = <0x07 0xffffffff 0xffffffff>; - }; - }; - }; - }; - - soc { - #address-cells = <0x01>; - dma-noncoherent; - #size-cells = <0x01>; - interrupt-parent = <0x08>; - compatible = "simple-bus"; - ranges; - - watchdog@20500a0 { - clock-names = "hosc\0losc"; - interrupts = <0x4f 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt-reset\0allwinner,sun20i-d1-wdt"; - status = "reserved"; - reg = <0x20500a0 0x20>; - }; - - serial@2501000 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x19>; - resets = <0x01 0x16>; - interrupts = <0x16 0x04>; - clocks = <0x01 0x42>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2501000 0x400>; - dmas = <0x0d 0x12 0x0d 0x12>; - reg-shift = <0x02>; - }; - - hdmi@5500000 { - reg-io-width = <0x01>; - phy-names = "phy"; - clock-names = "iahb\0isfr\0cec"; - hvcc-supply = <0x3a>; - resets = <0x01 0x31>; - interrupts = <0x6d 0x04>; - clocks = <0x01 0x6d 0x01 0x6a 0x01 0x6c>; - compatible = "allwinner,sun20i-d1-dw-hdmi"; - status = "okay"; - phys = <0x39>; - reg = <0x5500000 0x10000>; - reset-names = "ctrl"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - reg = <0x00>; - - endpoint { - remote-endpoint = <0x3b>; - phandle = <0x32>; - }; - }; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x3c>; - phandle = <0x3f>; - }; - }; - }; - }; - - syscon@3000000 { - #address-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-system-control"; - ranges; - reg = <0x3000000 0x1000>; - phandle = <0x23>; - - regulators@3000150 { - compatible = "allwinner,sun20i-d1-system-ldos"; - reg = <0x3000150 0x04>; - - ldob { - }; - - ldoa { - regulator-max-microvolt = <0x1b7740>; - regulator-always-on; - ldo-in-supply = <0x0b>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x3a>; - }; - }; - }; - - mmc@4022000 { - mmc-ddr-3_3v; - #address-cells = <0x01>; - clock-names = "ahb\0mmc"; - no-sdio; - resets = <0x01 0x11>; - interrupts = <0x3a 0x04>; - clocks = <0x01 0x3d 0x01 0x3a>; - #size-cells = <0x00>; - no-sd; - mmc-ddr-1_8v; - compatible = "allwinner,sun20i-d1-emmc\0allwinner,sun50i-a100-emmc"; - status = "disabled"; - reg = <0x4022000 0x1000>; - max-frequency = <0x8f0d180>; - cap-mmc-highspeed; - reset-names = "ahb"; - }; - - i2c@2502000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1a>; - resets = <0x01 0x18>; - interrupts = <0x19 0x04>; - clocks = <0x01 0x44>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502000 0x400>; - dmas = <0x0d 0x2b 0x0d 0x2b>; - }; - - mixer@5100000 { - iommus = <0x25 0x02>; - clock-names = "bus\0mod"; - resets = <0x24 0x00>; - clocks = <0x24 0x00 0x24 0x06>; - compatible = "allwinner,sun20i-d1-de2-mixer-0"; - reg = <0x5100000 0x100000>; - phandle = <0x03>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x26>; - phandle = <0x2b>; - }; - }; - }; - }; - - crypto@3040000 { - clock-names = "bus\0mod\0ram\0trng"; - resets = <0x01 0x04>; - interrupts = <0x44 0x04>; - clocks = <0x01 0x22 0x01 0x21 0x01 0x32 0x0a 0x02>; - compatible = "allwinner,sun20i-d1-crypto"; - reg = <0x3040000 0x800>; - }; - - usb@4101400 { - phy-names = "usb"; - resets = <0x01 0x2a>; - interrupts = <0x2f 0x04>; - clocks = <0x01 0x63 0x01 0x61>; - compatible = "allwinner,sun20i-d1-ohci\0generic-ohci"; - status = "disabled"; - phys = <0x21 0x00>; - reg = <0x4101400 0x100>; - }; - - dmic@2031000 { - clock-names = "bus\0mod"; - resets = <0x01 0x26>; - interrupts = <0x28 0x04>; - clocks = <0x01 0x5d 0x01 0x5c>; - dma-names = "rx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-dmic\0allwinner,sun50i-h6-dmic"; - status = "disabled"; - reg = <0x2031000 0x400>; - dmas = <0x0d 0x08>; - }; - - serial@2500400 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x13 0x14>; - resets = <0x01 0x13>; - interrupts = <0x13 0x04>; - clocks = <0x01 0x3f>; - uart-has-rtscts; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500400 0x400>; - dmas = <0x0d 0x0f 0x0d 0x0f>; - reg-shift = <0x02>; - - bluetooth { - device-wake-gpios = <0x15 0x06 0x12 0x00>; - host-wake-gpios = <0x15 0x06 0x0e 0x00>; - compatible = "realtek,rtl8723ds-bt"; - enable-gpios = <0x15 0x06 0x0f 0x00>; - }; - }; - - dsi@5450000 { - #address-cells = <0x01>; - phy-names = "dphy"; - clock-names = "bus\0mod"; - resets = <0x01 0x33>; - interrupts = <0x6c 0x04>; - clocks = <0x01 0x6f 0x28 0x02>; - #size-cells = <0x00>; - compatible = "allwinner,sun20i-d1-mipi-dsi\0allwinner,sun50i-a100-mipi-dsi"; - status = "disabled"; - phys = <0x29>; - reg = <0x5450000 0x1000>; - - port { - - endpoint { - remote-endpoint = <0x2a>; - phandle = <0x35>; - }; - }; - }; - - spi@4025000 { - #address-cells = <0x01>; - num-cs = <0x01>; - clock-names = "ahb\0mod"; - resets = <0x01 0x1c>; - interrupts = <0x1f 0x04>; - clocks = <0x01 0x4a 0x01 0x48>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-spi\0allwinner,sun50i-r329-spi"; - status = "disabled"; - reg = <0x4025000 0x1000>; - dmas = <0x0d 0x16 0x0d 0x16>; - }; - - watchdog@1700400 { - clock-names = "hosc\0losc"; - interrupts = <0x8a 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt"; - status = "reserved"; - reg = <0x1700400 0x20>; - }; - - dram-controller@3102000 { - dma-ranges = <0x00 0x40000000 0x80000000>; - #address-cells = <0x01>; - clock-names = "mbus\0dram\0bus"; - reg-names = "mbus\0dram"; - interrupts = <0x3b 0x04>; - clocks = <0x01 0x1a 0x01 0x2f 0x01 0x37>; - #interconnect-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-mbus"; - reg = <0x3102000 0x1000 0x3103000 0x1000>; - }; - - i2s@2032000 { - clock-names = "apb\0mod"; - resets = <0x01 0x22>; - interrupts = <0x2a 0x04>; - clocks = <0x01 0x56 0x01 0x52>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2032000 0x1000>; - dmas = <0x0d 0x03 0x0d 0x03>; - }; - - interrupt-controller@10000000 { - #address-cells = <0x00>; - interrupts-extended = <0x3e 0x0b 0x3e 0x09>; - compatible = "allwinner,sun20i-d1-plic\0thead,c900-plic"; - #interrupt-cells = <0x02>; - reg = <0x10000000 0x4000000>; - phandle = <0x08>; - riscv,ndev = <0xb0>; - interrupt-controller; - }; - - clock-controller@7010000 { - #reset-cells = <0x01>; - clock-names = "hosc\0losc\0iosc\0pll-periph"; - clocks = <0x09 0x0a 0x00 0x0a 0x02 0x01 0x06>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-r-ccu"; - reg = <0x7010000 0x400>; - phandle = <0x3d>; - }; - - clock-controller@2001000 { - #reset-cells = <0x01>; - clock-names = "hosc\0losc\0iosc"; - clocks = <0x09 0x0a 0x00 0x0a 0x02>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-ccu"; - reg = <0x2001000 0x1000>; - phandle = <0x01>; - }; - - ethernet@4500000 { - syscon = <0x23>; - clock-names = "stmmaceth"; - resets = <0x01 0x1e>; - interrupts = <0x3e 0x04>; - clocks = <0x01 0x4d>; - compatible = "allwinner,sun20i-d1-emac\0allwinner,sun50i-a64-emac"; - status = "disabled"; - interrupt-names = "macirq"; - reg = <0x4500000 0x10000>; - reset-names = "stmmaceth"; - - mdio { - #address-cells = <0x01>; - #size-cells = <0x00>; - compatible = "snps,dwmac-mdio"; - }; - }; - - serial@2500c00 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x17 0x18>; - resets = <0x01 0x15>; - interrupts = <0x15 0x04>; - clocks = <0x01 0x41>; - uart-has-rtscts; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500c00 0x400>; - dmas = <0x0d 0x11 0x0d 0x11>; - reg-shift = <0x02>; - }; - - pwm@2000c00 { - clock-names = "bus\0mod"; - resets = <0x01 0x0d>; - interrupts = <0x22 0x04>; - clocks = <0x01 0x2d 0x09>; - #pwm-cells = <0x03>; - compatible = "allwinner,sun20i-d1-pwm"; - status = "disabled"; - reg = <0x2000c00 0x400>; - }; - - temperature-sensor@2009400 { - vref-supply = <0x0f>; - nvmem-cells = <0x0e>; - clock-names = "bus\0mod"; - resets = <0x01 0x21>; - interrupts = <0x4a 0x04>; - clocks = <0x01 0x51 0x09>; - #thermal-sensor-cells = <0x00>; - compatible = "allwinner,sun20i-d1-ths"; - nvmem-cell-names = "calibration"; - reg = <0x2009400 0x400>; - phandle = <0x05>; - }; - - usb@4200400 { - phy-names = "usb"; - resets = <0x01 0x2b>; - interrupts = <0x32 0x04>; - clocks = <0x01 0x64 0x01 0x62>; - compatible = "allwinner,sun20i-d1-ohci\0generic-ohci"; - status = "okay"; - phys = <0x21 0x01>; - reg = <0x4200400 0x100>; - }; - - usb@4101000 { - phy-names = "usb"; - resets = <0x01 0x2a 0x01 0x2c>; - interrupts = <0x2e 0x04>; - clocks = <0x01 0x63 0x01 0x65 0x01 0x61>; - compatible = "allwinner,sun20i-d1-ehci\0generic-ehci"; - status = "disabled"; - phys = <0x21 0x00>; - reg = <0x4101000 0x100>; - }; - - serial@2500000 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x12>; - resets = <0x01 0x12>; - interrupts = <0x12 0x04>; - clocks = <0x01 0x3e>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500000 0x400>; - dmas = <0x0d 0x0e 0x0d 0x0e>; - reg-shift = <0x02>; - }; - - efuse@3006000 { - #address-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-sid"; - reg = <0x3006000 0x1000>; - - bg-trim@28 { - bits = <0x10 0x08>; - reg = <0x28 0x04>; - phandle = <0x11>; - }; - - ths-calib@14 { - reg = <0x14 0x04>; - phandle = <0x0e>; - }; - }; - - mmc@4021000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x20>; - clock-names = "ahb\0mmc"; - cap-sd-highspeed; - vqmmc-supply = <0x0b>; - no-mmc; - bus-width = <0x04>; - non-removable; - resets = <0x01 0x10>; - interrupts = <0x39 0x04>; - clocks = <0x01 0x3c 0x01 0x39>; - #size-cells = <0x00>; - vmmc-supply = <0x0b>; - compatible = "allwinner,sun20i-d1-mmc"; - status = "okay"; - mmc-pwrseq = <0x1f>; - reg = <0x4021000 0x1000>; - max-frequency = <0x8f0d180>; - reset-names = "ahb"; - - wifi@1 { - local-mac-address = [be 91 45 a8 23 7f]; - interrupts = <0x06 0x0a 0x08>; - interrupt-parent = <0x15>; - interrupt-names = "host-wake"; - reg = <0x01>; - }; - }; - - clock-controller@5000000 { - #reset-cells = <0x01>; - clock-names = "bus\0mod"; - resets = <0x01 0x01>; - clocks = <0x01 0x1c 0x01 0x1b>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-de2-clk\0allwinner,sun50i-h5-de2-clk"; - reg = <0x5000000 0x10000>; - phandle = <0x24>; - }; - - iommu@2010000 { - interrupts = <0x50 0x04>; - clocks = <0x01 0x2e>; - #iommu-cells = <0x01>; - compatible = "allwinner,sun20i-d1-iommu"; - reg = <0x2010000 0x10000>; - phandle = <0x25>; - }; - - lcd-controller@5470000 { - clock-names = "ahb\0tcon-ch1"; - resets = <0x01 0x35>; - interrupts = <0x6b 0x04>; - clocks = <0x01 0x73 0x28 0x00>; - compatible = "allwinner,sun20i-d1-tcon-tv"; - reg = <0x5470000 0x1000>; - reset-names = "lcd"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@1 { - remote-endpoint = <0x37>; - reg = <0x01>; - phandle = <0x30>; - }; - - endpoint@0 { - remote-endpoint = <0x36>; - reg = <0x00>; - phandle = <0x2d>; - }; - }; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x38>; - phandle = <0x31>; - }; - }; - }; - }; - - i2s@2034000 { - clock-names = "apb\0mod"; - resets = <0x01 0x24>; - interrupts = <0x2c 0x04>; - clocks = <0x01 0x58 0x01 0x54>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2034000 0x1000>; - dmas = <0x0d 0x05 0x0d 0x05>; - }; - - usb@4200000 { - phy-names = "usb"; - resets = <0x01 0x2b 0x01 0x2d>; - interrupts = <0x31 0x04>; - clocks = <0x01 0x64 0x01 0x66 0x01 0x62>; - compatible = "allwinner,sun20i-d1-ehci\0generic-ehci"; - status = "okay"; - phys = <0x21 0x01>; - reg = <0x4200000 0x100>; - }; - - rtc@7090000 { - clock-names = "bus\0hosc\0ahb"; - interrupts = <0xa0 0x04>; - clocks = <0x3d 0x07 0x09 0x3d 0x00>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-rtc\0allwinner,sun50i-r329-rtc"; - reg = <0x7090000 0x400>; - phandle = <0x0a>; - }; - - i2c@2502800 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1c>; - resets = <0x01 0x1a>; - interrupts = <0x1b 0x04>; - clocks = <0x01 0x46>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502800 0x400>; - dmas = <0x0d 0x2d 0x0d 0x2d>; - }; - - timer@2050000 { - interrupts = <0x4b 0x04 0x4c 0x04>; - clocks = <0x09>; - compatible = "allwinner,sun20i-d1-timer\0allwinner,sun8i-a23-timer"; - reg = <0x2050000 0xa0>; - }; - - pinctrl@2000000 { - clock-names = "apb\0hosc\0losc"; - gpio-controller; - interrupts = <0x55 0x04 0x57 0x04 0x59 0x04 0x5b 0x04 0x5d 0x04 0x5f 0x04>; - clocks = <0x01 0x18 0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-pinctrl"; - #interrupt-cells = <0x03>; - vcc-pb-supply = <0x0b>; - vcc-pc-supply = <0x0b>; - reg = <0x2000000 0x800>; - phandle = <0x15>; - vcc-pd-supply = <0x0b>; - #gpio-cells = <0x03>; - vcc-pe-supply = <0x0c>; - vcc-pf-supply = <0x0b>; - vcc-pg-supply = <0x0b>; - interrupt-controller; - - i2c1-pb4-pins { - function = "i2c1"; - pins = "PB4\0PB5"; - phandle = <0x1b>; - }; - - i2c2-pc0-pins { - function = "i2c2"; - pins = "PC0\0PC1"; - phandle = <0x1c>; - }; - - uart3-pd10-pins { - function = "uart3"; - pins = "PD10\0PD11"; - phandle = <0x17>; - }; - - uart1-pg8-rts-cts-pins { - function = "uart1"; - pins = "PG8\0PG9"; - phandle = <0x14>; - }; - - uart3-pd13-rts-cts-pins { - function = "uart3"; - pins = "PD13\0PD14"; - phandle = <0x18>; - }; - - i2c3-pe16-pins { - function = "i2c3"; - pins = "PE16\0PE17"; - phandle = <0x1d>; - }; - - uart2-pb0-pins { - function = "uart2"; - pins = "PB0\0PB1"; - phandle = <0x16>; - }; - - mmc1-pins { - function = "mmc1"; - pins = "PG0\0PG1\0PG2\0PG3\0PG4\0PG5"; - phandle = <0x20>; - }; - - uart4-pb2-pins { - function = "uart4"; - pins = "PB2\0PB3"; - phandle = <0x19>; - }; - - mmc0-pins { - function = "mmc0"; - pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5"; - phandle = <0x1e>; - }; - - uart1-pg6-pins { - function = "uart1"; - pins = "PG6\0PG7"; - phandle = <0x13>; - }; - - uart0-pb8-pins { - function = "uart0"; - pins = "PB8\0PB9"; - phandle = <0x12>; - }; - - i2c0-pg12-pins { - function = "i2c0"; - pins = "PG12\0PG13"; - phandle = <0x1a>; - }; - }; - - usb@4100000 { - phy-names = "usb"; - resets = <0x01 0x2e>; - interrupts = <0x2d 0x04>; - clocks = <0x01 0x67>; - extcon = <0x21 0x00>; - compatible = "allwinner,sun20i-d1-musb\0allwinner,sun8i-a33-musb"; - status = "okay"; - interrupt-names = "mc"; - phys = <0x21 0x00>; - reg = <0x4100000 0x400>; - dr_mode = "peripheral"; - }; - - phy@5451000 { - clock-names = "bus\0mod"; - resets = <0x01 0x33>; - interrupts = <0x6c 0x04>; - clocks = <0x01 0x6f 0x01 0x6e>; - #phy-cells = <0x00>; - compatible = "allwinner,sun20i-d1-mipi-dphy\0allwinner,sun50i-a100-mipi-dphy"; - reg = <0x5451000 0x1000>; - phandle = <0x29>; - }; - - phy@4100400 { - clock-names = "usb0_phy\0usb1_phy"; - reg-names = "phy_ctrl\0pmu0\0pmu1"; - resets = <0x01 0x28 0x01 0x29>; - clocks = <0x09 0x09>; - #phy-cells = <0x01>; - compatible = "allwinner,sun20i-d1-usb-phy"; - status = "okay"; - usb0_vbus-supply = <0x22>; - reg = <0x4100400 0x100 0x4101800 0x100 0x4200800 0x100>; - phandle = <0x21>; - reset-names = "usb0_reset\0usb1_reset"; - }; - - mmc@4020000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1e>; - clock-names = "ahb\0mmc"; - cap-sd-highspeed; - vqmmc-supply = <0x0b>; - no-mmc; - bus-width = <0x04>; - resets = <0x01 0x0f>; - interrupts = <0x38 0x04>; - clocks = <0x01 0x3b 0x01 0x38>; - #size-cells = <0x00>; - vmmc-supply = <0x0b>; - compatible = "allwinner,sun20i-d1-mmc"; - status = "okay"; - disable-wp; - reg = <0x4020000 0x1000>; - max-frequency = <0x8f0d180>; - reset-names = "ahb"; - cd-gpios = <0x15 0x05 0x06 0x00>; - }; - - watchdog@6011000 { - clock-names = "hosc\0losc"; - interrupts = <0x93 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt"; - reg = <0x6011000 0x20>; - }; - - dma-controller@3002000 { - clock-names = "bus\0mbus"; - resets = <0x01 0x06>; - interrupts = <0x42 0x04>; - clocks = <0x01 0x25 0x01 0x30>; - dma-requests = <0x30>; - compatible = "allwinner,sun20i-d1-dma"; - reg = <0x3002000 0x1000>; - phandle = <0x0d>; - dma-channels = <0x10>; - #dma-cells = <0x01>; - }; - - tcon-top@5460000 { - clock-output-names = "tcon-top-tv0\0tcon-top-dsi"; - clock-names = "bus\0tcon-tv0\0tve0\0dsi"; - resets = <0x01 0x30>; - clocks = <0x01 0x69 0x01 0x72 0x01 0x74 0x01 0x70>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-tcon-top"; - reg = <0x5460000 0x1000>; - phandle = <0x28>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@0 { - remote-endpoint = <0x2b>; - reg = <0x00>; - phandle = <0x26>; - }; - }; - - port@5 { - reg = <0x05>; - - endpoint { - remote-endpoint = <0x32>; - phandle = <0x3b>; - }; - }; - - port@3 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x03>; - - endpoint@2 { - remote-endpoint = <0x30>; - reg = <0x02>; - phandle = <0x37>; - }; - - endpoint@0 { - remote-endpoint = <0x2f>; - reg = <0x00>; - phandle = <0x34>; - }; - }; - - port@1 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x01>; - - endpoint@2 { - remote-endpoint = <0x2d>; - reg = <0x02>; - phandle = <0x36>; - }; - - endpoint@0 { - remote-endpoint = <0x2c>; - reg = <0x00>; - phandle = <0x33>; - }; - }; - - port@4 { - reg = <0x04>; - - endpoint { - remote-endpoint = <0x31>; - phandle = <0x38>; - }; - }; - - port@2 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x02>; - - endpoint@1 { - remote-endpoint = <0x2e>; - reg = <0x01>; - phandle = <0x27>; - }; - }; - }; - }; - - serial@2501400 { - reg-io-width = <0x04>; - resets = <0x01 0x17>; - interrupts = <0x17 0x04>; - clocks = <0x01 0x43>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "disabled"; - reg = <0x2501400 0x400>; - dmas = <0x0d 0x13 0x0d 0x13>; - reg-shift = <0x02>; - }; - - spi@4026000 { - #address-cells = <0x01>; - num-cs = <0x01>; - clock-names = "ahb\0mod"; - resets = <0x01 0x1d>; - interrupts = <0x20 0x04>; - clocks = <0x01 0x4b 0x01 0x49>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-spi-dbi\0allwinner,sun50i-r329-spi-dbi\0allwinner,sun50i-r329-spi"; - status = "disabled"; - reg = <0x4026000 0x1000>; - dmas = <0x0d 0x17 0x0d 0x17>; - }; - - keys@2009800 { - vref-supply = <0x0f>; - resets = <0x01 0x2f>; - interrupts = <0x4d 0x04>; - clocks = <0x01 0x68>; - compatible = "allwinner,sun20i-d1-lradc\0allwinner,sun50i-r329-lradc"; - status = "disabled"; - reg = <0x2009800 0x400>; - }; - - phy@5510000 { - clock-names = "bus\0mod"; - resets = <0x01 0x32>; - clocks = <0x01 0x6d 0x01 0x6a>; - #phy-cells = <0x00>; - compatible = "allwinner,sun20i-d1-hdmi-phy"; - status = "okay"; - reg = <0x5510000 0x10000>; - phandle = <0x39>; - reset-names = "phy"; - }; - - i2c@2502400 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1b>; - resets = <0x01 0x19>; - interrupts = <0x1a 0x04>; - clocks = <0x01 0x45>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502400 0x400>; - dmas = <0x0d 0x2c 0x0d 0x2c>; - }; - - i2s@2033000 { - clock-names = "apb\0mod"; - resets = <0x01 0x23>; - interrupts = <0x2b 0x04>; - clocks = <0x01 0x57 0x01 0x53>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2033000 0x1000>; - dmas = <0x0d 0x04 0x0d 0x04>; - }; - - lcd-controller@5461000 { - clock-output-names = "tcon-pixel-clock"; - phy-names = "lvds0"; - clock-names = "ahb\0tcon-ch0"; - resets = <0x01 0x34 0x01 0x36>; - interrupts = <0x6a 0x04>; - clocks = <0x01 0x71 0x01 0x70>; - #clock-cells = <0x00>; - compatible = "allwinner,sun20i-d1-tcon-lcd"; - phys = <0x29>; - reg = <0x5461000 0x1000>; - reset-names = "lcd\0lvds"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@1 { - remote-endpoint = <0x34>; - reg = <0x01>; - phandle = <0x2f>; - }; - - endpoint@0 { - remote-endpoint = <0x33>; - reg = <0x00>; - phandle = <0x2c>; - }; - }; - - port@1 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x01>; - - endpoint@1 { - remote-endpoint = <0x35>; - reg = <0x01>; - phandle = <0x2a>; - }; - }; - }; - }; - - mixer@5200000 { - iommus = <0x25 0x02>; - clock-names = "bus\0mod"; - resets = <0x24 0x01>; - clocks = <0x24 0x01 0x24 0x07>; - compatible = "allwinner,sun20i-d1-de2-mixer-1"; - reg = <0x5200000 0x100000>; - phandle = <0x04>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x27>; - phandle = <0x2e>; - }; - }; - }; - }; - - audio-codec@2030000 { - #address-cells = <0x01>; - clock-names = "bus\0adc\0dac\0hosc\0losc"; - resets = <0x01 0x27>; - interrupts = <0x29 0x04>; - clocks = <0x01 0x60 0x01 0x5f 0x01 0x5e 0x09 0x0a 0x00>; - #size-cells = <0x01>; - avcc-supply = <0x0f>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-codec\0simple-mfd\0syscon"; - reg = <0x2030000 0x1000>; - dmas = <0x0d 0x07 0x0d 0x07>; - hpvcc-supply = <0x10>; - - regulators@2030348 { - nvmem-cells = <0x11>; - compatible = "allwinner,sun20i-d1-analog-ldos"; - nvmem-cell-names = "bg_trim"; - reg = <0x2030348 0x04>; - - hpldo { - regulator-max-microvolt = <0x1b7740>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x10>; - hpldoin-supply = <0x0b>; - }; - - aldo { - regulator-max-microvolt = <0x1b7740>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x0f>; - vdd33-supply = <0x0b>; - }; - }; - }; - - serial@2500800 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x16>; - resets = <0x01 0x14>; - interrupts = <0x14 0x04>; - clocks = <0x01 0x40>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500800 0x400>; - dmas = <0x0d 0x10 0x0d 0x10>; - reg-shift = <0x02>; - }; - - spdif@2036000 { - clock-names = "apb\0rx\0tx"; - resets = <0x01 0x25>; - interrupts = <0x27 0x04>; - clocks = <0x01 0x5b 0x01 0x5a 0x01 0x59>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-spdif"; - status = "disabled"; - reg = <0x2036000 0x400>; - dmas = <0x0d 0x02 0x0d 0x02>; - }; - - led-controller@2008000 { - #address-cells = <0x01>; - clock-names = "bus\0mod"; - resets = <0x01 0x3b>; - interrupts = <0x24 0x04>; - clocks = <0x01 0x7b 0x01 0x7a>; - #size-cells = <0x00>; - dma-names = "tx"; - compatible = "allwinner,sun20i-d1-ledc\0allwinner,sun50i-a100-ledc"; - status = "disabled"; - reg = <0x2008000 0x400>; - dmas = <0x0d 0x2a>; - }; - - i2c@2502c00 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1d>; - resets = <0x01 0x1b>; - interrupts = <0x1c 0x04>; - clocks = <0x01 0x47>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502c00 0x400>; - dmas = <0x0d 0x2e 0x0d 0x2e>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led-0 { - function = "status"; - color = <0x03>; - gpios = <0x15 0x03 0x12 0x00>; - }; - }; - - dvdd { - regulator-max-microvolt = <0x124f80>; - regulator-min-microvolt = <0x124f80>; - regulator-name = "dvdd"; - compatible = "regulator-fixed"; - vin-supply = <0x0b>; - }; - - aliases { - ethernet0 = "/soc/mmc@4021000/wifi@1"; - serial3 = "/soc/serial@2501000"; - serial1 = "/soc/serial@2500800"; - serial4 = "/soc/serial@2501400"; - mmc0 = "/soc/mmc@4020000"; - serial2 = "/soc/serial@2500c00"; - serial0 = "/soc/serial@2500000"; - }; - - display-engine { - allwinner,pipelines = <0x03 0x04>; - compatible = "allwinner,sun20i-d1-display-engine"; - status = "okay"; - }; - - chosen { - linux,uefi-mmap-size = <0x690>; - u-boot,version = "2024.01-rc1"; - bootargs = "BOOT_IMAGE=/boot/vmlinuz-6.8.0-31-generic root=LABEL=cloudimg-rootfs ro efi=debug earlycon"; - boot-hartid = <0x00>; - linux,uefi-mmap-start = <0x00 0x7a3c9068>; - linux,uefi-mmap-desc-size = <0x28>; - linux,uefi-mmap-desc-ver = <0x01>; - linux,uefi-secure-boot = <0x02>; - linux,uefi-system-table = <0x00 0x7ff59d38>; - stdout-path = "serial0:115200n8"; - }; - - vcc-3v3 { - regulator-max-microvolt = <0x325aa0>; - regulator-min-microvolt = <0x325aa0>; - regulator-name = "vcc-3v3"; - compatible = "regulator-fixed"; - phandle = <0x0b>; - vin-supply = <0x22>; - }; - - vcc { - regulator-max-microvolt = <0x4c4b40>; - regulator-min-microvolt = <0x4c4b40>; - regulator-name = "vcc"; - compatible = "regulator-fixed"; - phandle = <0x22>; - }; - - osc24M-clk { - clock-output-names = "osc24M"; - #clock-cells = <0x00>; - clock-frequency = <0x16e3600>; - compatible = "fixed-clock"; - phandle = <0x09>; - }; - - cpus { - #address-cells = <0x01>; - #size-cells = <0x00>; - timebase-frequency = <0x16e3600>; - - cpu@0 { - cpu-supply = <0x02>; - clocks = <0x01 0x84>; - d-cache-block-size = <0x40>; - clock-frequency = <0x16e3600>; - device_type = "cpu"; - compatible = "thead,c906\0riscv"; - mmu-type = "riscv,sv39"; - d-cache-size = <0x8000>; - i-cache-size = <0x8000>; - reg = <0x00>; - phandle = <0x07>; - d-cache-sets = <0x100>; - i-cache-block-size = <0x40>; - i-cache-sets = <0x80>; - riscv,isa = "rv64imafdc"; - #cooling-cells = <0x02>; - - interrupt-controller { - #address-cells = <0x00>; - compatible = "riscv,cpu-intc"; - #interrupt-cells = <0x01>; - phandle = <0x3e>; - interrupt-controller; - }; - }; - }; - - reserved-memory { - #address-cells = <0x01>; - #size-cells = <0x01>; - ranges; - - mmode_resv0@40040000 { - reg = <0x40040000 0x20000>; - phandle = <0x41>; - no-map; - }; - - mmode_resv1@40000000 { - reg = <0x40000000 0x40000>; - phandle = <0x40>; - no-map; - }; - }; -}; diff --git a/alt-trees/serial/mqpro-serial.dts b/alt-trees/serial/mqpro-serial.dts new file mode 100644 index 0000000..033a996 --- /dev/null +++ b/alt-trees/serial/mqpro-serial.dts @@ -0,0 +1,319 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2022 Samuel Holland + +#include +#include + +/dts-v1/; + +#include "sun20i-d1.dtsi" +#include "sun20i-common-regulators.dtsi" + +/ { + model = "MangoPi MQ Pro"; + compatible = "widora,mangopi-mq-pro", "allwinner,sun20i-d1"; + + aliases { + ethernet0 = &rtl8723ds; + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + hdmi_connector: connector { + compatible = "hdmi-connector"; + type = "c"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_out_connector>; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */ + }; + }; + + reg_avdd2v8: avdd2v8 { + compatible = "regulator-fixed"; + regulator-name = "avdd2v8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + vin-supply = <®_vcc_3v3>; + }; + + reg_dvdd: dvdd { + compatible = "regulator-fixed"; + regulator-name = "dvdd"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + vin-supply = <®_vcc_3v3>; + }; + + reg_vdd_cpu: vdd-cpu { + compatible = "regulator-fixed"; + regulator-name = "vdd-cpu"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + vin-supply = <®_vcc>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&pio 6 17 GPIO_ACTIVE_LOW>; /* PG17 */ + }; +}; + +&cpu0 { + cpu-supply = <®_vdd_cpu>; +}; + +&dcxo { + clock-frequency = <24000000>; +}; + +&codec { + routing = "Internal Speaker", "HPOUTL", + "Internal Speaker", "HPOUTR"; + widgets = "Speaker", "Internal Speaker"; + status = "okay"; +}; + +&de { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_connector: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&hdmi_phy { + status = "okay"; +}; + +&mmc0 { + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + disable-wp; + vmmc-supply = <®_vcc_3v3>; + vqmmc-supply = <®_vcc_3v3>; + pinctrl-0 = <&mmc0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&mmc1 { + bus-width = <4>; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + vmmc-supply = <®_vcc_3v3>; + vqmmc-supply = <®_vcc_3v3>; + pinctrl-0 = <&mmc1_pins>; + pinctrl-names = "default"; + status = "okay"; + + rtl8723ds: wifi@1 { + reg = <1>; + interrupt-parent = <&pio>; + interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 */ + interrupt-names = "host-wake"; + }; +}; + +&ohci1 { + status = "okay"; +}; + +&pio { + vcc-pe-supply = <®_avdd2v8>; + + /omit-if-no-ref/ + i2c0_pg12_pins: i2c0-pg12-pins { + pins = "PG12", "PG13"; + function = "i2c0"; + }; + + /omit-if-no-ref/ + i2c1_pb4_pins: i2c1-pb4-pins { + pins = "PB4", "PB5"; + function = "i2c1"; + }; + + /omit-if-no-ref/ + i2c2_pb0_pins: i2c2-pb0-pins { + pins = "PB0", "PB1"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c2_pc0_pins: i2c2-pc0-pins { + pins = "PC0", "PC1"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c3_pe16_pins: i2c3-pe16-pins { + pins = "PE16", "PE17"; + function = "i2c3"; + }; + + /omit-if-no-ref/ + uart2_pc0_pins: uart2-pc0-pins { + pins = "PC0", "PC1"; + function = "uart2"; + }; + + /omit-if-no-ref/ + uart3_pd10_pins: uart3-pd10-pins { + pins = "PD10", "PD11"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart3_pd13_rts_cts_pins: uart3-pd13-rts-cts-pins { + pins = "PD13", "PD14"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart3_pb6_pins: uart3-pb6-pins { + pins = "PB6", "PB7"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart4_pb2_pins: uart4-pb2-pins { + pins = "PB2", "PB3"; + function = "uart4"; + }; + + /omit-if-no-ref/ + uart5_pb4_pins: uart5-pb4-pins { + pins = "PB4", "PB5"; + function = "uart5"; + }; +}; + +/* Disabled +&spi1 { + pinctrl-0 = <&spi1_pd_pins>; // conflicts uart3 + pinctrl-names = "default"; + status = "okay"; +}; +*/ + +&i2c0 { + pinctrl-0 = <&i2c0_pg12_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +/* Disabled +&i2c1 { + pinctrl-0 = <&i2c1_pb4_pins>; // conflicts uart5 + pinctrl-names = "default"; + status = "okay"; +}; +*/ + +/* disabled +&i2c2 { + pinctrl-0 = <&i2c2_pb0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; +*/ + +&i2c2 { + pinctrl-0 = <&i2c2_pc0_pins>; // conflicts uart2 + pinctrl-names = "default"; + status = "okay"; +}; + +&i2c3 { + pinctrl-0 = <&i2c3_pe16_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&uart0 { + pinctrl-0 = <&uart0_pb8_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&uart1 { + uart-has-rtscts; + pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>; + pinctrl-names = "default"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723ds-bt"; + device-wake-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */ + enable-gpios = <&pio 6 15 GPIO_ACTIVE_HIGH>; /* PG15 */ + host-wake-gpios = <&pio 6 14 GPIO_ACTIVE_HIGH>; /* PG14 */ + }; +}; + +&uart2 { + pinctrl-0 = <&uart2_pc0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&uart3 { + uart-has-rtscts; + pinctrl-0 = <&uart3_pd10_pins>, <&uart3_pd13_rts_cts_pins>; // conflicts spi1 + pinctrl-names = "default"; + status = "okay"; +}; + +/* Disabled +&uart3 { + pinctrl-0 = <&uart3_pb6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; +*/ + +&uart4 { + pinctrl-0 = <&uart4_pb2_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&uart5 { + pinctrl-0 = <&uart5_pb4_pins>; // conflicts i2c1 + pinctrl-names = "default"; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + usb1_vbus-supply = <®_vcc>; + status = "okay"; +}; diff --git a/alt-trees/spi/mq-pro-spi.dts b/alt-trees/spi/mq-pro-spi.dts deleted file mode 100644 index 4da309e..0000000 --- a/alt-trees/spi/mq-pro-spi.dts +++ /dev/null @@ -1,1290 +0,0 @@ -/dts-v1/; - -/ { - #address-cells = <0x01>; - model = "MangoPi MQ Pro"; - #size-cells = <0x01>; - compatible = "widora,mangopi-mq-pro\0allwinner,sun20i-d1"; - - connector { - type = "c"; - compatible = "hdmi-connector"; - - port { - - endpoint { - remote-endpoint = <0x3e>; - phandle = <0x3b>; - }; - }; - }; - - avdd2v8 { - regulator-max-microvolt = <0x2ab980>; - regulator-min-microvolt = <0x2ab980>; - regulator-name = "avdd2v8"; - compatible = "regulator-fixed"; - phandle = <0x0c>; - vin-supply = <0x0b>; - }; - - vdd-cpu { - regulator-max-microvolt = <0x10c8e0>; - regulator-min-microvolt = <0x10c8e0>; - regulator-name = "vdd-cpu"; - compatible = "regulator-fixed"; - phandle = <0x02>; - vin-supply = <0x21>; - }; - - wifi-pwrseq { - reset-gpios = <0x15 0x06 0x11 0x01>; - compatible = "mmc-pwrseq-simple"; - phandle = <0x1d>; - }; - - thermal-zones { - - cpu-thermal { - polling-delay = <0x00>; - polling-delay-passive = <0x00>; - thermal-sensors = <0x05>; - - trips { - - cpu-crit { - temperature = <0x1adb0>; - hysteresis = <0x00>; - type = "critical"; - }; - - cpu-target { - temperature = <0x14c08>; - hysteresis = <0xbb8>; - type = "passive"; - phandle = <0x06>; - }; - }; - - cooling-maps { - - map0 { - trip = <0x06>; - cooling-device = <0x07 0xffffffff 0xffffffff>; - }; - }; - }; - }; - - soc { - #address-cells = <0x01>; - dma-noncoherent; - #size-cells = <0x01>; - interrupt-parent = <0x08>; - compatible = "simple-bus"; - ranges; - - watchdog@20500a0 { - clock-names = "hosc\0losc"; - interrupts = <0x4f 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt-reset\0allwinner,sun20i-d1-wdt"; - status = "reserved"; - reg = <0x20500a0 0x20>; - }; - - serial@2501000 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x17>; - resets = <0x01 0x16>; - interrupts = <0x16 0x04>; - clocks = <0x01 0x42>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2501000 0x400>; - dmas = <0x0d 0x12 0x0d 0x12>; - reg-shift = <0x02>; - }; - - hdmi@5500000 { - reg-io-width = <0x01>; - phy-names = "phy"; - clock-names = "iahb\0isfr\0cec"; - hvcc-supply = <0x39>; - resets = <0x01 0x31>; - interrupts = <0x6d 0x04>; - clocks = <0x01 0x6d 0x01 0x6a 0x01 0x6c>; - compatible = "allwinner,sun20i-d1-dw-hdmi"; - status = "okay"; - phys = <0x38>; - reg = <0x5500000 0x10000>; - reset-names = "ctrl"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - reg = <0x00>; - - endpoint { - remote-endpoint = <0x3a>; - phandle = <0x31>; - }; - }; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x3b>; - phandle = <0x3e>; - }; - }; - }; - }; - - syscon@3000000 { - #address-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-system-control"; - ranges; - reg = <0x3000000 0x1000>; - phandle = <0x22>; - - regulators@3000150 { - compatible = "allwinner,sun20i-d1-system-ldos"; - reg = <0x3000150 0x04>; - - ldob { - }; - - ldoa { - regulator-max-microvolt = <0x1b7740>; - regulator-always-on; - ldo-in-supply = <0x0b>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x39>; - }; - }; - }; - - mmc@4022000 { - mmc-ddr-3_3v; - #address-cells = <0x01>; - clock-names = "ahb\0mmc"; - no-sdio; - resets = <0x01 0x11>; - interrupts = <0x3a 0x04>; - clocks = <0x01 0x3d 0x01 0x3a>; - #size-cells = <0x00>; - no-sd; - mmc-ddr-1_8v; - compatible = "allwinner,sun20i-d1-emmc\0allwinner,sun50i-a100-emmc"; - status = "disabled"; - reg = <0x4022000 0x1000>; - max-frequency = <0x8f0d180>; - cap-mmc-highspeed; - reset-names = "ahb"; - }; - - i2c@2502000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x19>; - resets = <0x01 0x18>; - interrupts = <0x19 0x04>; - clocks = <0x01 0x44>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502000 0x400>; - dmas = <0x0d 0x2b 0x0d 0x2b>; - }; - - mixer@5100000 { - iommus = <0x24 0x02>; - clock-names = "bus\0mod"; - resets = <0x23 0x00>; - clocks = <0x23 0x00 0x23 0x06>; - compatible = "allwinner,sun20i-d1-de2-mixer-0"; - reg = <0x5100000 0x100000>; - phandle = <0x03>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x25>; - phandle = <0x2a>; - }; - }; - }; - }; - - crypto@3040000 { - clock-names = "bus\0mod\0ram\0trng"; - resets = <0x01 0x04>; - interrupts = <0x44 0x04>; - clocks = <0x01 0x22 0x01 0x21 0x01 0x32 0x0a 0x02>; - compatible = "allwinner,sun20i-d1-crypto"; - reg = <0x3040000 0x800>; - }; - - usb@4101400 { - phy-names = "usb"; - resets = <0x01 0x2a>; - interrupts = <0x2f 0x04>; - clocks = <0x01 0x63 0x01 0x61>; - compatible = "allwinner,sun20i-d1-ohci\0generic-ohci"; - status = "disabled"; - phys = <0x20 0x00>; - reg = <0x4101400 0x100>; - }; - - dmic@2031000 { - clock-names = "bus\0mod"; - resets = <0x01 0x26>; - interrupts = <0x28 0x04>; - clocks = <0x01 0x5d 0x01 0x5c>; - dma-names = "rx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-dmic\0allwinner,sun50i-h6-dmic"; - status = "disabled"; - reg = <0x2031000 0x400>; - dmas = <0x0d 0x08>; - }; - - serial@2500400 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x13 0x14>; - resets = <0x01 0x13>; - interrupts = <0x13 0x04>; - clocks = <0x01 0x3f>; - uart-has-rtscts; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500400 0x400>; - dmas = <0x0d 0x0f 0x0d 0x0f>; - reg-shift = <0x02>; - - bluetooth { - device-wake-gpios = <0x15 0x06 0x12 0x00>; - host-wake-gpios = <0x15 0x06 0x0e 0x00>; - compatible = "realtek,rtl8723ds-bt"; - enable-gpios = <0x15 0x06 0x0f 0x00>; - }; - }; - - dsi@5450000 { - #address-cells = <0x01>; - phy-names = "dphy"; - clock-names = "bus\0mod"; - resets = <0x01 0x33>; - interrupts = <0x6c 0x04>; - clocks = <0x01 0x6f 0x27 0x02>; - #size-cells = <0x00>; - compatible = "allwinner,sun20i-d1-mipi-dsi\0allwinner,sun50i-a100-mipi-dsi"; - status = "disabled"; - phys = <0x28>; - reg = <0x5450000 0x1000>; - - port { - - endpoint { - remote-endpoint = <0x29>; - phandle = <0x34>; - }; - }; - }; - - spi@4025000 { - #address-cells = <0x01>; - num-cs = <0x01>; - clock-names = "ahb\0mod"; - resets = <0x01 0x1c>; - interrupts = <0x1f 0x04>; - clocks = <0x01 0x4a 0x01 0x48>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-spi\0allwinner,sun50i-r329-spi"; - status = "disabled"; - reg = <0x4025000 0x1000>; - dmas = <0x0d 0x16 0x0d 0x16>; - }; - - watchdog@1700400 { - clock-names = "hosc\0losc"; - interrupts = <0x8a 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt"; - status = "reserved"; - reg = <0x1700400 0x20>; - }; - - dram-controller@3102000 { - dma-ranges = <0x00 0x40000000 0x80000000>; - #address-cells = <0x01>; - clock-names = "mbus\0dram\0bus"; - reg-names = "mbus\0dram"; - interrupts = <0x3b 0x04>; - clocks = <0x01 0x1a 0x01 0x2f 0x01 0x37>; - #interconnect-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-mbus"; - reg = <0x3102000 0x1000 0x3103000 0x1000>; - }; - - i2s@2032000 { - clock-names = "apb\0mod"; - resets = <0x01 0x22>; - interrupts = <0x2a 0x04>; - clocks = <0x01 0x56 0x01 0x52>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2032000 0x1000>; - dmas = <0x0d 0x03 0x0d 0x03>; - }; - - interrupt-controller@10000000 { - #address-cells = <0x00>; - interrupts-extended = <0x3d 0x0b 0x3d 0x09>; - compatible = "allwinner,sun20i-d1-plic\0thead,c900-plic"; - #interrupt-cells = <0x02>; - reg = <0x10000000 0x4000000>; - phandle = <0x08>; - riscv,ndev = <0xb0>; - interrupt-controller; - }; - - clock-controller@7010000 { - #reset-cells = <0x01>; - clock-names = "hosc\0losc\0iosc\0pll-periph"; - clocks = <0x09 0x0a 0x00 0x0a 0x02 0x01 0x06>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-r-ccu"; - reg = <0x7010000 0x400>; - phandle = <0x3c>; - }; - - clock-controller@2001000 { - #reset-cells = <0x01>; - clock-names = "hosc\0losc\0iosc"; - clocks = <0x09 0x0a 0x00 0x0a 0x02>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-ccu"; - reg = <0x2001000 0x1000>; - phandle = <0x01>; - }; - - ethernet@4500000 { - syscon = <0x22>; - clock-names = "stmmaceth"; - resets = <0x01 0x1e>; - interrupts = <0x3e 0x04>; - clocks = <0x01 0x4d>; - compatible = "allwinner,sun20i-d1-emac\0allwinner,sun50i-a64-emac"; - status = "disabled"; - interrupt-names = "macirq"; - reg = <0x4500000 0x10000>; - reset-names = "stmmaceth"; - - mdio { - #address-cells = <0x01>; - #size-cells = <0x00>; - compatible = "snps,dwmac-mdio"; - }; - }; - - serial@2500c00 { - reg-io-width = <0x04>; - resets = <0x01 0x15>; - interrupts = <0x15 0x04>; - clocks = <0x01 0x41>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "disabled"; - reg = <0x2500c00 0x400>; - dmas = <0x0d 0x11 0x0d 0x11>; - reg-shift = <0x02>; - }; - - pwm@2000c00 { - clock-names = "bus\0mod"; - resets = <0x01 0x0d>; - interrupts = <0x22 0x04>; - clocks = <0x01 0x2d 0x09>; - #pwm-cells = <0x03>; - compatible = "allwinner,sun20i-d1-pwm"; - status = "disabled"; - reg = <0x2000c00 0x400>; - }; - - temperature-sensor@2009400 { - vref-supply = <0x0f>; - nvmem-cells = <0x0e>; - clock-names = "bus\0mod"; - resets = <0x01 0x21>; - interrupts = <0x4a 0x04>; - clocks = <0x01 0x51 0x09>; - #thermal-sensor-cells = <0x00>; - compatible = "allwinner,sun20i-d1-ths"; - nvmem-cell-names = "calibration"; - reg = <0x2009400 0x400>; - phandle = <0x05>; - }; - - usb@4200400 { - phy-names = "usb"; - resets = <0x01 0x2b>; - interrupts = <0x32 0x04>; - clocks = <0x01 0x64 0x01 0x62>; - compatible = "allwinner,sun20i-d1-ohci\0generic-ohci"; - status = "okay"; - phys = <0x20 0x01>; - reg = <0x4200400 0x100>; - }; - - usb@4101000 { - phy-names = "usb"; - resets = <0x01 0x2a 0x01 0x2c>; - interrupts = <0x2e 0x04>; - clocks = <0x01 0x63 0x01 0x65 0x01 0x61>; - compatible = "allwinner,sun20i-d1-ehci\0generic-ehci"; - status = "disabled"; - phys = <0x20 0x00>; - reg = <0x4101000 0x100>; - }; - - serial@2500000 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x12>; - resets = <0x01 0x12>; - interrupts = <0x12 0x04>; - clocks = <0x01 0x3e>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500000 0x400>; - dmas = <0x0d 0x0e 0x0d 0x0e>; - reg-shift = <0x02>; - }; - - efuse@3006000 { - #address-cells = <0x01>; - #size-cells = <0x01>; - compatible = "allwinner,sun20i-d1-sid"; - reg = <0x3006000 0x1000>; - - bg-trim@28 { - bits = <0x10 0x08>; - reg = <0x28 0x04>; - phandle = <0x11>; - }; - - ths-calib@14 { - reg = <0x14 0x04>; - phandle = <0x0e>; - }; - }; - - mmc@4021000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1e>; - clock-names = "ahb\0mmc"; - cap-sd-highspeed; - vqmmc-supply = <0x0b>; - no-mmc; - bus-width = <0x04>; - non-removable; - resets = <0x01 0x10>; - interrupts = <0x39 0x04>; - clocks = <0x01 0x3c 0x01 0x39>; - #size-cells = <0x00>; - vmmc-supply = <0x0b>; - compatible = "allwinner,sun20i-d1-mmc"; - status = "okay"; - mmc-pwrseq = <0x1d>; - reg = <0x4021000 0x1000>; - max-frequency = <0x8f0d180>; - reset-names = "ahb"; - - wifi@1 { - local-mac-address = [aa f9 2a 2c ac db]; - interrupts = <0x06 0x0a 0x08>; - interrupt-parent = <0x15>; - interrupt-names = "host-wake"; - reg = <0x01>; - }; - }; - - clock-controller@5000000 { - #reset-cells = <0x01>; - clock-names = "bus\0mod"; - resets = <0x01 0x01>; - clocks = <0x01 0x1c 0x01 0x1b>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-de2-clk\0allwinner,sun50i-h5-de2-clk"; - reg = <0x5000000 0x10000>; - phandle = <0x23>; - }; - - iommu@2010000 { - interrupts = <0x50 0x04>; - clocks = <0x01 0x2e>; - #iommu-cells = <0x01>; - compatible = "allwinner,sun20i-d1-iommu"; - reg = <0x2010000 0x10000>; - phandle = <0x24>; - }; - - lcd-controller@5470000 { - clock-names = "ahb\0tcon-ch1"; - resets = <0x01 0x35>; - interrupts = <0x6b 0x04>; - clocks = <0x01 0x73 0x27 0x00>; - compatible = "allwinner,sun20i-d1-tcon-tv"; - reg = <0x5470000 0x1000>; - reset-names = "lcd"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@1 { - remote-endpoint = <0x36>; - reg = <0x01>; - phandle = <0x2f>; - }; - - endpoint@0 { - remote-endpoint = <0x35>; - reg = <0x00>; - phandle = <0x2c>; - }; - }; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x37>; - phandle = <0x30>; - }; - }; - }; - }; - - i2s@2034000 { - clock-names = "apb\0mod"; - resets = <0x01 0x24>; - interrupts = <0x2c 0x04>; - clocks = <0x01 0x58 0x01 0x54>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2034000 0x1000>; - dmas = <0x0d 0x05 0x0d 0x05>; - }; - - usb@4200000 { - phy-names = "usb"; - resets = <0x01 0x2b 0x01 0x2d>; - interrupts = <0x31 0x04>; - clocks = <0x01 0x64 0x01 0x66 0x01 0x62>; - compatible = "allwinner,sun20i-d1-ehci\0generic-ehci"; - status = "okay"; - phys = <0x20 0x01>; - reg = <0x4200000 0x100>; - }; - - rtc@7090000 { - clock-names = "bus\0hosc\0ahb"; - interrupts = <0xa0 0x04>; - clocks = <0x3c 0x07 0x09 0x3c 0x00>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-rtc\0allwinner,sun50i-r329-rtc"; - reg = <0x7090000 0x400>; - phandle = <0x0a>; - }; - - i2c@2502800 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1a>; - resets = <0x01 0x1a>; - interrupts = <0x1b 0x04>; - clocks = <0x01 0x46>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502800 0x400>; - dmas = <0x0d 0x2d 0x0d 0x2d>; - }; - - timer@2050000 { - interrupts = <0x4b 0x04 0x4c 0x04>; - clocks = <0x09>; - compatible = "allwinner,sun20i-d1-timer\0allwinner,sun8i-a23-timer"; - reg = <0x2050000 0xa0>; - }; - - pinctrl@2000000 { - clock-names = "apb\0hosc\0losc"; - gpio-controller; - interrupts = <0x55 0x04 0x57 0x04 0x59 0x04 0x5b 0x04 0x5d 0x04 0x5f 0x04>; - clocks = <0x01 0x18 0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-pinctrl"; - #interrupt-cells = <0x03>; - vcc-pb-supply = <0x0b>; - vcc-pc-supply = <0x0b>; - reg = <0x2000000 0x800>; - phandle = <0x15>; - vcc-pd-supply = <0x0b>; - #gpio-cells = <0x03>; - vcc-pe-supply = <0x0c>; - vcc-pf-supply = <0x0b>; - vcc-pg-supply = <0x0b>; - interrupt-controller; - - i2c2-pc0-pins { - function = "i2c2"; - pins = "PC0\0PC1"; - phandle = <0x1a>; - }; - - uart1-pg8-rts-cts-pins { - function = "uart1"; - pins = "PG8\0PG9"; - phandle = <0x14>; - }; - - i2c3-pe16-pins { - function = "i2c3"; - pins = "PE16\0PE17"; - phandle = <0x1b>; - }; - - uart2-pb0-pins { - function = "uart2"; - pins = "PB0\0PB1"; - phandle = <0x16>; - }; - - mmc1-pins { - function = "mmc1"; - pins = "PG0\0PG1\0PG2\0PG3\0PG4\0PG5"; - phandle = <0x1e>; - }; - - uart5-pb4-pins { - function = "uart5"; - pins = "PB4\0PB5"; - phandle = <0x18>; - }; - - uart4-pb2-pins { - function = "uart4"; - pins = "PB2\0PB3"; - phandle = <0x17>; - }; - - mmc0-pins { - function = "mmc0"; - pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5"; - phandle = <0x1c>; - }; - - uart1-pg6-pins { - function = "uart1"; - pins = "PG6\0PG7"; - phandle = <0x13>; - }; - - uart0-pb8-pins { - function = "uart0"; - pins = "PB8\0PB9"; - phandle = <0x12>; - }; - - spi1-pd-pins { - function = "spi1"; - pins = "PD10\0PD11\0PD12\0PD13\0PD14\0PD15"; - phandle = <0x1f>; - }; - - i2c0-pg12-pins { - function = "i2c0"; - pins = "PG12\0PG13"; - phandle = <0x19>; - }; - }; - - usb@4100000 { - phy-names = "usb"; - resets = <0x01 0x2e>; - interrupts = <0x2d 0x04>; - clocks = <0x01 0x67>; - extcon = <0x20 0x00>; - compatible = "allwinner,sun20i-d1-musb\0allwinner,sun8i-a33-musb"; - status = "okay"; - interrupt-names = "mc"; - phys = <0x20 0x00>; - reg = <0x4100000 0x400>; - dr_mode = "peripheral"; - }; - - phy@5451000 { - clock-names = "bus\0mod"; - resets = <0x01 0x33>; - interrupts = <0x6c 0x04>; - clocks = <0x01 0x6f 0x01 0x6e>; - #phy-cells = <0x00>; - compatible = "allwinner,sun20i-d1-mipi-dphy\0allwinner,sun50i-a100-mipi-dphy"; - reg = <0x5451000 0x1000>; - phandle = <0x28>; - }; - - phy@4100400 { - clock-names = "usb0_phy\0usb1_phy"; - reg-names = "phy_ctrl\0pmu0\0pmu1"; - resets = <0x01 0x28 0x01 0x29>; - clocks = <0x09 0x09>; - #phy-cells = <0x01>; - compatible = "allwinner,sun20i-d1-usb-phy"; - status = "okay"; - usb0_vbus-supply = <0x21>; - reg = <0x4100400 0x100 0x4101800 0x100 0x4200800 0x100>; - phandle = <0x20>; - reset-names = "usb0_reset\0usb1_reset"; - }; - - mmc@4020000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1c>; - clock-names = "ahb\0mmc"; - cap-sd-highspeed; - vqmmc-supply = <0x0b>; - no-mmc; - bus-width = <0x04>; - resets = <0x01 0x0f>; - interrupts = <0x38 0x04>; - clocks = <0x01 0x3b 0x01 0x38>; - #size-cells = <0x00>; - vmmc-supply = <0x0b>; - compatible = "allwinner,sun20i-d1-mmc"; - status = "okay"; - disable-wp; - reg = <0x4020000 0x1000>; - max-frequency = <0x8f0d180>; - reset-names = "ahb"; - cd-gpios = <0x15 0x05 0x06 0x00>; - }; - - watchdog@6011000 { - clock-names = "hosc\0losc"; - interrupts = <0x93 0x04>; - clocks = <0x09 0x0a 0x00>; - compatible = "allwinner,sun20i-d1-wdt"; - reg = <0x6011000 0x20>; - }; - - dma-controller@3002000 { - clock-names = "bus\0mbus"; - resets = <0x01 0x06>; - interrupts = <0x42 0x04>; - clocks = <0x01 0x25 0x01 0x30>; - dma-requests = <0x30>; - compatible = "allwinner,sun20i-d1-dma"; - reg = <0x3002000 0x1000>; - phandle = <0x0d>; - dma-channels = <0x10>; - #dma-cells = <0x01>; - }; - - tcon-top@5460000 { - clock-output-names = "tcon-top-tv0\0tcon-top-dsi"; - clock-names = "bus\0tcon-tv0\0tve0\0dsi"; - resets = <0x01 0x30>; - clocks = <0x01 0x69 0x01 0x72 0x01 0x74 0x01 0x70>; - #clock-cells = <0x01>; - compatible = "allwinner,sun20i-d1-tcon-top"; - reg = <0x5460000 0x1000>; - phandle = <0x27>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@0 { - remote-endpoint = <0x2a>; - reg = <0x00>; - phandle = <0x25>; - }; - }; - - port@5 { - reg = <0x05>; - - endpoint { - remote-endpoint = <0x31>; - phandle = <0x3a>; - }; - }; - - port@3 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x03>; - - endpoint@2 { - remote-endpoint = <0x2f>; - reg = <0x02>; - phandle = <0x36>; - }; - - endpoint@0 { - remote-endpoint = <0x2e>; - reg = <0x00>; - phandle = <0x33>; - }; - }; - - port@1 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x01>; - - endpoint@2 { - remote-endpoint = <0x2c>; - reg = <0x02>; - phandle = <0x35>; - }; - - endpoint@0 { - remote-endpoint = <0x2b>; - reg = <0x00>; - phandle = <0x32>; - }; - }; - - port@4 { - reg = <0x04>; - - endpoint { - remote-endpoint = <0x30>; - phandle = <0x37>; - }; - }; - - port@2 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x02>; - - endpoint@1 { - remote-endpoint = <0x2d>; - reg = <0x01>; - phandle = <0x26>; - }; - }; - }; - }; - - serial@2501400 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x18>; - resets = <0x01 0x17>; - interrupts = <0x17 0x04>; - clocks = <0x01 0x43>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2501400 0x400>; - dmas = <0x0d 0x13 0x0d 0x13>; - reg-shift = <0x02>; - }; - - spi@4026000 { - pinctrl-names = "default"; - #address-cells = <0x01>; - num-cs = <0x01>; - pinctrl-0 = <0x1f>; - clock-names = "ahb\0mod"; - resets = <0x01 0x1d>; - interrupts = <0x20 0x04>; - clocks = <0x01 0x4b 0x01 0x49>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-spi-dbi\0allwinner,sun50i-r329-spi-dbi\0allwinner,sun50i-r329-spi"; - status = "okay"; - reg = <0x4026000 0x1000>; - dmas = <0x0d 0x17 0x0d 0x17>; - }; - - keys@2009800 { - vref-supply = <0x0f>; - resets = <0x01 0x2f>; - interrupts = <0x4d 0x04>; - clocks = <0x01 0x68>; - compatible = "allwinner,sun20i-d1-lradc\0allwinner,sun50i-r329-lradc"; - status = "disabled"; - reg = <0x2009800 0x400>; - }; - - phy@5510000 { - clock-names = "bus\0mod"; - resets = <0x01 0x32>; - clocks = <0x01 0x6d 0x01 0x6a>; - #phy-cells = <0x00>; - compatible = "allwinner,sun20i-d1-hdmi-phy"; - status = "okay"; - reg = <0x5510000 0x10000>; - phandle = <0x38>; - reset-names = "phy"; - }; - - i2c@2502400 { - #address-cells = <0x01>; - resets = <0x01 0x19>; - interrupts = <0x1a 0x04>; - clocks = <0x01 0x45>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "disabled"; - reg = <0x2502400 0x400>; - dmas = <0x0d 0x2c 0x0d 0x2c>; - }; - - i2s@2033000 { - clock-names = "apb\0mod"; - resets = <0x01 0x23>; - interrupts = <0x2b 0x04>; - clocks = <0x01 0x57 0x01 0x53>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-i2s\0allwinner,sun50i-r329-i2s"; - status = "disabled"; - reg = <0x2033000 0x1000>; - dmas = <0x0d 0x04 0x0d 0x04>; - }; - - lcd-controller@5461000 { - clock-output-names = "tcon-pixel-clock"; - phy-names = "lvds0"; - clock-names = "ahb\0tcon-ch0"; - resets = <0x01 0x34 0x01 0x36>; - interrupts = <0x6a 0x04>; - clocks = <0x01 0x71 0x01 0x70>; - #clock-cells = <0x00>; - compatible = "allwinner,sun20i-d1-tcon-lcd"; - phys = <0x28>; - reg = <0x5461000 0x1000>; - reset-names = "lcd\0lvds"; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@0 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x00>; - - endpoint@1 { - remote-endpoint = <0x33>; - reg = <0x01>; - phandle = <0x2e>; - }; - - endpoint@0 { - remote-endpoint = <0x32>; - reg = <0x00>; - phandle = <0x2b>; - }; - }; - - port@1 { - #address-cells = <0x01>; - #size-cells = <0x00>; - reg = <0x01>; - - endpoint@1 { - remote-endpoint = <0x34>; - reg = <0x01>; - phandle = <0x29>; - }; - }; - }; - }; - - mixer@5200000 { - iommus = <0x24 0x02>; - clock-names = "bus\0mod"; - resets = <0x23 0x01>; - clocks = <0x23 0x01 0x23 0x07>; - compatible = "allwinner,sun20i-d1-de2-mixer-1"; - reg = <0x5200000 0x100000>; - phandle = <0x04>; - - ports { - #address-cells = <0x01>; - #size-cells = <0x00>; - - port@1 { - reg = <0x01>; - - endpoint { - remote-endpoint = <0x26>; - phandle = <0x2d>; - }; - }; - }; - }; - - audio-codec@2030000 { - #address-cells = <0x01>; - clock-names = "bus\0adc\0dac\0hosc\0losc"; - resets = <0x01 0x27>; - interrupts = <0x29 0x04>; - clocks = <0x01 0x60 0x01 0x5f 0x01 0x5e 0x09 0x0a 0x00>; - #size-cells = <0x01>; - avcc-supply = <0x0f>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-codec\0simple-mfd\0syscon"; - reg = <0x2030000 0x1000>; - dmas = <0x0d 0x07 0x0d 0x07>; - hpvcc-supply = <0x10>; - - regulators@2030348 { - nvmem-cells = <0x11>; - compatible = "allwinner,sun20i-d1-analog-ldos"; - nvmem-cell-names = "bg_trim"; - reg = <0x2030348 0x04>; - - hpldo { - regulator-max-microvolt = <0x1b7740>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x10>; - hpldoin-supply = <0x0b>; - }; - - aldo { - regulator-max-microvolt = <0x1b7740>; - regulator-min-microvolt = <0x1b7740>; - phandle = <0x0f>; - vdd33-supply = <0x0b>; - }; - }; - }; - - serial@2500800 { - reg-io-width = <0x04>; - pinctrl-names = "default"; - pinctrl-0 = <0x16>; - resets = <0x01 0x14>; - interrupts = <0x14 0x04>; - clocks = <0x01 0x40>; - dma-names = "rx\0tx"; - compatible = "snps,dw-apb-uart"; - status = "okay"; - reg = <0x2500800 0x400>; - dmas = <0x0d 0x10 0x0d 0x10>; - reg-shift = <0x02>; - }; - - spdif@2036000 { - clock-names = "apb\0rx\0tx"; - resets = <0x01 0x25>; - interrupts = <0x27 0x04>; - clocks = <0x01 0x5b 0x01 0x5a 0x01 0x59>; - dma-names = "rx\0tx"; - #sound-dai-cells = <0x00>; - compatible = "allwinner,sun20i-d1-spdif"; - status = "disabled"; - reg = <0x2036000 0x400>; - dmas = <0x0d 0x02 0x0d 0x02>; - }; - - led-controller@2008000 { - #address-cells = <0x01>; - clock-names = "bus\0mod"; - resets = <0x01 0x3b>; - interrupts = <0x24 0x04>; - clocks = <0x01 0x7b 0x01 0x7a>; - #size-cells = <0x00>; - dma-names = "tx"; - compatible = "allwinner,sun20i-d1-ledc\0allwinner,sun50i-a100-ledc"; - status = "disabled"; - reg = <0x2008000 0x400>; - dmas = <0x0d 0x2a>; - }; - - i2c@2502c00 { - pinctrl-names = "default"; - #address-cells = <0x01>; - pinctrl-0 = <0x1b>; - resets = <0x01 0x1b>; - interrupts = <0x1c 0x04>; - clocks = <0x01 0x47>; - #size-cells = <0x00>; - dma-names = "rx\0tx"; - compatible = "allwinner,sun20i-d1-i2c\0allwinner,sun8i-v536-i2c\0allwinner,sun6i-a31-i2c"; - status = "okay"; - reg = <0x2502c00 0x400>; - dmas = <0x0d 0x2e 0x0d 0x2e>; - }; - }; - - leds { - compatible = "gpio-leds"; - - led-0 { - function = "status"; - color = <0x03>; - gpios = <0x15 0x03 0x12 0x00>; - }; - }; - - dvdd { - regulator-max-microvolt = <0x124f80>; - regulator-min-microvolt = <0x124f80>; - regulator-name = "dvdd"; - compatible = "regulator-fixed"; - vin-supply = <0x0b>; - }; - - aliases { - ethernet0 = "/soc/mmc@4021000/wifi@1"; - serial3 = "/soc/serial@2501000"; - serial1 = "/soc/serial@2500800"; - serial4 = "/soc/serial@2501400"; - mmc0 = "/soc/mmc@4020000"; - serial2 = "/soc/serial@2500c00"; - serial0 = "/soc/serial@2500000"; - }; - - display-engine { - allwinner,pipelines = <0x03 0x04>; - compatible = "allwinner,sun20i-d1-display-engine"; - status = "okay"; - }; - - chosen { - linux,uefi-mmap-size = <0x690>; - u-boot,version = "2024.01-rc1"; - bootargs = "BOOT_IMAGE=/boot/vmlinuz-6.8.0-31-generic root=LABEL=cloudimg-rootfs ro efi=debug earlycon"; - boot-hartid = <0x00>; - linux,uefi-mmap-start = <0x00 0x7a3c9068>; - linux,uefi-mmap-desc-size = <0x28>; - linux,uefi-mmap-desc-ver = <0x01>; - linux,uefi-secure-boot = <0x02>; - linux,uefi-system-table = <0x00 0x7ff59d38>; - stdout-path = "serial0:115200n8"; - }; - - vcc-3v3 { - regulator-max-microvolt = <0x325aa0>; - regulator-min-microvolt = <0x325aa0>; - regulator-name = "vcc-3v3"; - compatible = "regulator-fixed"; - phandle = <0x0b>; - vin-supply = <0x21>; - }; - - vcc { - regulator-max-microvolt = <0x4c4b40>; - regulator-min-microvolt = <0x4c4b40>; - regulator-name = "vcc"; - compatible = "regulator-fixed"; - phandle = <0x21>; - }; - - osc24M-clk { - clock-output-names = "osc24M"; - #clock-cells = <0x00>; - clock-frequency = <0x16e3600>; - compatible = "fixed-clock"; - phandle = <0x09>; - }; - - cpus { - #address-cells = <0x01>; - #size-cells = <0x00>; - timebase-frequency = <0x16e3600>; - - cpu@0 { - cpu-supply = <0x02>; - clocks = <0x01 0x84>; - d-cache-block-size = <0x40>; - clock-frequency = <0x16e3600>; - device_type = "cpu"; - compatible = "thead,c906\0riscv"; - mmu-type = "riscv,sv39"; - d-cache-size = <0x8000>; - i-cache-size = <0x8000>; - reg = <0x00>; - phandle = <0x07>; - d-cache-sets = <0x100>; - i-cache-block-size = <0x40>; - i-cache-sets = <0x80>; - riscv,isa = "rv64imafdc"; - #cooling-cells = <0x02>; - - interrupt-controller { - #address-cells = <0x00>; - compatible = "riscv,cpu-intc"; - #interrupt-cells = <0x01>; - phandle = <0x3d>; - interrupt-controller; - }; - }; - }; - - reserved-memory { - #address-cells = <0x01>; - #size-cells = <0x01>; - ranges; - - mmode_resv0@40040000 { - reg = <0x40040000 0x20000>; - phandle = <0x40>; - no-map; - }; - - mmode_resv1@40000000 { - reg = <0x40000000 0x40000>; - phandle = <0x3f>; - no-map; - }; - }; -}; diff --git a/alt-trees/spi/README.md b/alt-trees/spi_i2c/README.md similarity index 73% rename from alt-trees/spi/README.md rename to alt-trees/spi_i2c/README.md index 06bcbb6..5fcd7f9 100644 --- a/alt-trees/spi/README.md +++ b/alt-trees/spi_i2c/README.md @@ -6,23 +6,23 @@ Gpio Header: 3v3 1 --o o-- 2 5v i2c0.sda (2502000.i2c:205) PG13 3 --o o-- 4 5v i2c0.sck (2502000.i2c:204) PG12 5 --o o-- 6 gnd - free (39) PB7 7 --o o-- 8 PB8 uart0.tx (2500000.serial:40) + uart3.rx (2500c00.serial:39 PB7 7 --o o-- 8 PB8 uart0.tx (2500000.serial:40) gnd 9 --o o-- 10 PB9 uart0.rx (2500000.serial:41) - free (117) PD21 11 --o o-- 12 PB5 uart5.rx (2501400.serial:37) + free (117) PD21 11 --o o-- 12 PB5 i2c1.sda (2502400.i2c:37) free (118) PD22 13 --o o-- 14 gnd - uart2.tx (2500800.serial:32) PB0 15 --o o-- 16 PB1 uart2.rx (2500800.serial:33) + i2c2.sck (2502800.i2c:32) PB0 15 --o o-- 16 PB1 i2c2.sda (2502800.i2c:33) 3v3 17 --o o-- 18 PD14 spi1.hold (4026000.spi:110) spi1.mosi (4026000.spi:108) PD12 19 --o o-- 20 gnd - spi1.miso (4026000.spi:109) PD13 21 --o o-- 22 PC1 i2c2.sda (2502800.i2c:65) + spi1.miso (4026000.spi:109) PD13 21 --o o-- 22 PC1 uart2.rx (2500800.serial:65) spi1.clk (4026000.spi:107) PD11 23 --o o-- 24 PD10 spi1.cs (4026000.spi:106) gnd 25 --o o-- 26 PD15 spi1.wp (4026000.spi:111) i2c3.sda (2502c00.i2c:145) PE17 27 --o o-- 28 PE16 i2c3.sck (2502c00.i2c:144) free (42) PB10 29 --o o-- 30 gnd - free (43) PB11 31 --o o-- 32 PC0 i2c2.sck (2502800.i2c:64) + free (43) PB11 31 --o o-- 32 PC0 uart2.tx (2500800.serial:64) free (44) PB12 33 --o o-- 34 gnd - free (38) PB6 35 --o o-- 36 PB2 uart4.tx (2501000.serial:34) + uart3.tx (2500c00.serial:38) PB6 35 --o o-- 36 PB2 uart4.tx (2501000.serial:34) free (113) PD17 37 --o o-- 38 PB3 uart4.rx (2501000.serial:35) - gnd 39 --o o-- 40 PB4 uart5.tx (2501400.serial:36) + gnd 39 --o o-- 40 PB4 i2c1.sck (2502400.i2c:36 Other gpio outputs of interest: -- PD18: Blue Status Led - gpio (2000000.pinctrl:114) diff --git a/alt-trees/general/mq-pro-general.dts b/alt-trees/spi_i2c/mqpro-spi-i2c.dts similarity index 55% rename from alt-trees/general/mq-pro-general.dts rename to alt-trees/spi_i2c/mqpro-spi-i2c.dts index 48bbe8a..a03ea4e 100644 --- a/alt-trees/general/mq-pro-general.dts +++ b/alt-trees/spi_i2c/mqpro-spi-i2c.dts @@ -22,6 +22,17 @@ stdout-path = "serial0:115200n8"; }; + hdmi_connector: connector { + compatible = "hdmi-connector"; + type = "c"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_out_connector>; + }; + }; + }; + leds { compatible = "gpio-leds"; @@ -70,10 +81,35 @@ clock-frequency = <24000000>; }; +&codec { + routing = "Internal Speaker", "HPOUTL", + "Internal Speaker", "HPOUTR"; + widgets = "Speaker", "Internal Speaker"; + status = "okay"; +}; + +&de { + status = "okay"; +}; + &ehci1 { status = "okay"; }; +&hdmi { + status = "okay"; +}; + +&hdmi_out { + hdmi_out_connector: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&hdmi_phy { + status = "okay"; +}; + &mmc0 { bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ @@ -109,10 +145,76 @@ &pio { vcc-pe-supply = <®_avdd2v8>; + + /omit-if-no-ref/ + i2c0_pg12_pins: i2c0-pg12-pins { + pins = "PG12", "PG13"; + function = "i2c0"; + }; + + /omit-if-no-ref/ + i2c1_pb4_pins: i2c1-pb4-pins { + pins = "PB4", "PB5"; + function = "i2c1"; + }; + + /omit-if-no-ref/ + i2c2_pb0_pins: i2c2-pb0-pins { + pins = "PB0", "PB1"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c2_pc0_pins: i2c2-pc0-pins { + pins = "PC0", "PC1"; + function = "i2c2"; + }; + + /omit-if-no-ref/ + i2c3_pe16_pins: i2c3-pe16-pins { + pins = "PE16", "PE17"; + function = "i2c3"; + }; + + /omit-if-no-ref/ + uart2_pc0_pins: uart2-pc0-pins { + pins = "PC0", "PC1"; + function = "uart2"; + }; + + /omit-if-no-ref/ + uart3_pd10_pins: uart3-pd10-pins { + pins = "PD10", "PD11"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart3_pd13_rts_cts_pins: uart3-pd13-rts-cts-pins { + pins = "PD13", "PD14"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart3_pb6_pins: uart3-pb6-pins { + pins = "PB6", "PB7"; + function = "uart3"; + }; + + /omit-if-no-ref/ + uart4_pb2_pins: uart4-pb2-pins { + pins = "PB2", "PB3"; + function = "uart4"; + }; + + /omit-if-no-ref/ + uart5_pb4_pins: uart5-pb4-pins { + pins = "PB4", "PB5"; + function = "uart5"; + }; }; &spi1 { - pinctrl-0 = <&spi1_pd_pins>; + pinctrl-0 = <&spi1_pd_pins>; // conflicts uart3 pinctrl-names = "default"; status = "okay"; }; @@ -123,17 +225,25 @@ status = "okay"; }; -/*&i2c1 { - pinctrl-0 = <&i2c1_pb4_pins>; +&i2c1 { + pinctrl-0 = <&i2c1_pb4_pins>; // conflicts uart5 pinctrl-names = "default"; status = "okay"; -};*/ +}; -/*&i2c2 { - pinctrl-0 = <&i2c2_pc0_pins>; +&i2c2 { + pinctrl-0 = <&i2c2_pb0_pins>; pinctrl-names = "default"; status = "okay"; -};*/ +}; + +/* disabled +&i2c2 { + pinctrl-0 = <&i2c2_pc0_pins>; // conflicts uart2 + pinctrl-names = "default"; + status = "okay"; +}; +*/ &i2c3 { pinctrl-0 = <&i2c3_pe16_pins>; @@ -162,36 +272,39 @@ }; &uart2 { - pinctrl-0 = <&uart2_pc0_pins>; - pinctrl-names = "default"; - status = "okay"; + pinctrl-0 = <&uart2_pc0_pins>; + pinctrl-names = "default"; + status = "okay"; }; -/*&uart3 { - uart-has-rtscts; - pinctrl-0 = <&uart3_pd10_pins>, <&uart3_pd13_rts_cts_pins>; - pinctrl-names = "default"; - status = "okay"; -};*/ +/* Disabled +&uart3 { + uart-has-rtscts; + pinctrl-0 = <&uart3_pd10_pins>, <&uart3_pd13_rts_cts_pins>; // conflicts spi1 + pinctrl-names = "default"; + status = "okay"; +}; +*/ + +&uart3 { + pinctrl-0 = <&uart3_pb6_pins>; + pinctrl-names = "default"; + status = "okay"; +}; &uart4 { - pinctrl-0 = <&uart4_pb2_pins>; - pinctrl-names = "default"; - status = "okay"; + pinctrl-0 = <&uart4_pb2_pins>; + pinctrl-names = "default"; + status = "okay"; }; -/*&uart5 { - pinctrl-0 = <&uart5_pb4_pins>; - pinctrl-names = "default"; - status = "okay"; -};*/ - -&pwm { - //pinctrl-0 = <&pwm0_pb12_pin>, <&pwm2_pd18_pin>; - pinctrl-0 = <&pwm0_pb12_pin>; - pinctrl-names = "default"; - status = "okay"; +/* Disabled +&uart5 { + pinctrl-0 = <&uart5_pb4_pins>; // conflicts i2c1 + pinctrl-names = "default"; + status = "okay"; }; +*/ &usb_otg { dr_mode = "peripheral"; diff --git a/build-trees/make_dtb.sh b/build-trees/make_dtb.sh index 1f53434..b1536a7 100755 --- a/build-trees/make_dtb.sh +++ b/build-trees/make_dtb.sh @@ -10,7 +10,7 @@ echo "Compiling against headers for $revision" if [ -d "$revision" ]; then echo "Cleaning and Using existing build directory" - rm "$revision/*.dts $revision/*.dtsi $revision/*.dtb" + rm $revision/*.dts $revision/*.dtsi $revision/*.dtb else echo "Creating new build directory: $revision" mkdir "$revision"