diff --git a/.gitignore b/.gitignore index 1528bde..a728c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /output /external_tree/customizations/users.table -/external_tree/customizations/overlay/ +/external_tree/customizations/overlay diff --git a/external_tree/board/iminc/pine64-a64-plus-system-agent/boot.cmd b/external_tree/board/iminc/pine64-a64-plus-system-agent/boot.cmd index e9ec872..459b5ed 100644 --- a/external_tree/board/iminc/pine64-a64-plus-system-agent/boot.cmd +++ b/external_tree/board/iminc/pine64-a64-plus-system-agent/boot.cmd @@ -2,10 +2,14 @@ setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait fatload mmc 0 $kernel_addr_r Image fatload mmc 0 $fdt_addr_r sun50i-a64-pine64-plus.dtb -fatload mmc 0 0x4F000000 overlays/spidev.dtbo fdt addr ${fdt_addr_r} fdt resize 8192 + +fatload mmc 0 0x4F000000 overlays/spidev.dtbo +fdt apply 0x4F000000 + +fatload mmc 0 0x4F000000 overlays/i2c-pcf8574a.dtbo fdt apply 0x4F000000 bootefi $kernel_addr_r $fdt_addr_r diff --git a/external_tree/board/iminc/pine64-a64-plus-system-agent/overlays/i2c-pcf8574a.dts b/external_tree/board/iminc/pine64-a64-plus-system-agent/overlays/i2c-pcf8574a.dts new file mode 100644 index 0000000..18393b3 --- /dev/null +++ b/external_tree/board/iminc/pine64-a64-plus-system-agent/overlays/i2c-pcf8574a.dts @@ -0,0 +1,37 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun50i-a64"; + + fragment@0 { + target = <&pio>; + __overlay__ { + pcf8574a_irq_pins: pcf8574a_irq_pins { + pins = "PC12"; + function = "irq"; + bias-pull-up; + }; + }; + }; + + fragment@1 { + target = <&i2c1>; + __overlay__ { + pcf8574a: pcf8574a@38 { + status = "okay"; + compatible = "nxp,pcf8574a"; + reg = <0x38>; + #gpio-cells = <2>; + gpio-controller; + pinctrl-names = "default"; + pinctrl-0 = <&pcf8574a_irq_pins>; + interrupt-parent = <&pio>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <2 12 2>; // PC12, falling edge triggered. + irq-gpios = <&pio 2 12 1>; // GPIO 22, on 40p header. + }; + }; + }; +}; diff --git a/external_tree/board/iminc/pine64-a64-plus-system-agent/pine64_a64_plus_defconfig b/external_tree/board/iminc/pine64-a64-plus-system-agent/pine64_a64_plus_defconfig index 374b6a4..b61c39c 100644 --- a/external_tree/board/iminc/pine64-a64-plus-system-agent/pine64_a64_plus_defconfig +++ b/external_tree/board/iminc/pine64-a64-plus-system-agent/pine64_a64_plus_defconfig @@ -314,6 +314,7 @@ CONFIG_GPIO_XGENE=y CONFIG_GPIO_MAX732X=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=y CONFIG_GPIO_BD9571MWV=m CONFIG_GPIO_MAX77620=y CONFIG_POWER_RESET_BRCMSTB=y diff --git a/external_tree/board/iminc/pine64-a64-plus-system-agent/post-image.sh b/external_tree/board/iminc/pine64-a64-plus-system-agent/post-image.sh index cd6ee22..f35bda0 100755 --- a/external_tree/board/iminc/pine64-a64-plus-system-agent/post-image.sh +++ b/external_tree/board/iminc/pine64-a64-plus-system-agent/post-image.sh @@ -43,6 +43,7 @@ rm -rf "${GENIMAGE_TMP}" mkdir -p "${BINARIES_DIR}/overlays" cp "${BINARIES_DIR}/spidev.dtb" "${BINARIES_DIR}/overlays/spidev.dtbo" +cp "${BINARIES_DIR}/i2c-pcf8574a.dtb" "${BINARIES_DIR}/overlays/i2c-pcf8574a.dtbo" genimage \ --rootpath "${ROOTPATH_TMP}" \ diff --git a/external_tree/board/iminc/raspberrypi-4b-system-agent/config.tmpl.txt b/external_tree/board/iminc/raspberrypi-4b-system-agent/config.tmpl.txt index 3ed456e..6bfffaf 100644 --- a/external_tree/board/iminc/raspberrypi-4b-system-agent/config.tmpl.txt +++ b/external_tree/board/iminc/raspberrypi-4b-system-agent/config.tmpl.txt @@ -10,5 +10,5 @@ dtoverlay=i2c-pcf8574a,addr=0x38,interrupt=22 dtoverlay=i2c-rtc,ds3231 # Add BME280 sensor -dtoverlay=i2c-bme280,addr=0x76 +# dtoverlay=i2c-bme280,addr=0x76 diff --git a/external_tree/board/iminc/raspberrypi-4b-system-agent/linux.fragment b/external_tree/board/iminc/raspberrypi-4b-system-agent/linux.fragment index e69de29..641d554 100644 --- a/external_tree/board/iminc/raspberrypi-4b-system-agent/linux.fragment +++ b/external_tree/board/iminc/raspberrypi-4b-system-agent/linux.fragment @@ -0,0 +1,2 @@ +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" diff --git a/external_tree/configs/system_agent_orangepi_pc_defconfig b/external_tree/configs/system_agent_orangepi_pc_defconfig index 439af3f..0df41ce 100644 --- a/external_tree/configs/system_agent_orangepi_pc_defconfig +++ b/external_tree/configs/system_agent_orangepi_pc_defconfig @@ -27,7 +27,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_system_agent_PATH)/board/iminc/orangepi-pc-system-agent/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.10" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.13" BR2_LINUX_KERNEL_DEFCONFIG="sunxi" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/orangepi-pc-system-agent/linux.fragment" BR2_LINUX_KERNEL_DTS_SUPPORT=y diff --git a/external_tree/configs/system_agent_pine64_plus_defconfig b/external_tree/configs/system_agent_pine64_plus_defconfig index 45af0ea..53212e0 100644 --- a/external_tree/configs/system_agent_pine64_plus_defconfig +++ b/external_tree/configs/system_agent_pine64_plus_defconfig @@ -26,13 +26,13 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.10" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12.13" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/pine64_a64_plus_defconfig" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/linux.fragment" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-a64-pine64-plus" -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/overlays/spidev.dts" +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/overlays/spidev.dts $(BR2_EXTERNAL_system_agent_PATH)/board/iminc/pine64-a64-plus-system-agent/overlays/i2c-pcf8574a.dts" BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y BR2_PACKAGE_LINUX_TOOLS_CPUPOWER=y BR2_PACKAGE_LINUX_TOOLS_GPIO=y