mainline: i2c up: at24 1-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
default-cape-symlinks
Robert Nelson 1 year ago
parent 51c9053a5c
commit 2bde9fae08

@ -123,9 +123,16 @@ if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
#./scripts/config --disable CONFIG_SMP #./scripts/config --disable CONFIG_SMP
else else
make ARCH=riscv CROSS_COMPILE=${CC} defconfig make ARCH=riscv CROSS_COMPILE=${CC} defconfig
fi
#make ARCH=riscv CROSS_COMPILE=${CC} menuconfig #./scripts/config --enable
./scripts/config --enable CONFIG_PCIE_MICROCHIP_HOST
./scripts/config --enable CONFIG_OF_OVERLAY
./scripts/config --enable CONFIG_I2C
./scripts/config --enable CONFIG_EEPROM_AT24
./scripts/config --enable CONFIG_I2C_MICROCHIP_CORE
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} olddefconfig
fi
echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs" echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs

@ -1201,7 +1201,7 @@ CONFIG_VGA_ARB_MAX_GPUS=16
# CONFIG_PCI_FTPCI100 is not set # CONFIG_PCI_FTPCI100 is not set
CONFIG_PCI_HOST_COMMON=y CONFIG_PCI_HOST_COMMON=y
CONFIG_PCI_HOST_GENERIC=y CONFIG_PCI_HOST_GENERIC=y
# CONFIG_PCIE_MICROCHIP_HOST is not set CONFIG_PCIE_MICROCHIP_HOST=y
# CONFIG_PCIE_RCAR_HOST is not set # CONFIG_PCIE_RCAR_HOST is not set
CONFIG_PCIE_XILINX=y CONFIG_PCIE_XILINX=y
@ -1273,6 +1273,7 @@ CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
CONFIG_SOC_BUS=y CONFIG_SOC_BUS=y
CONFIG_REGMAP=y CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_MMIO=y
CONFIG_DMA_SHARED_BUFFER=y CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set # CONFIG_DMA_FENCE_TRACE is not set
@ -1339,10 +1340,12 @@ CONFIG_OF=y
CONFIG_OF_FLATTREE=y CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_KOBJ=y CONFIG_OF_KOBJ=y
CONFIG_OF_DYNAMIC=y
CONFIG_OF_ADDRESS=y CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y CONFIG_OF_IRQ=y
CONFIG_OF_RESERVED_MEM=y CONFIG_OF_RESERVED_MEM=y
# CONFIG_OF_OVERLAY is not set CONFIG_OF_RESOLVE=y
CONFIG_OF_OVERLAY=y
# CONFIG_PARPORT is not set # CONFIG_PARPORT is not set
CONFIG_PNP=y CONFIG_PNP=y
CONFIG_PNP_DEBUG_MESSAGES=y CONFIG_PNP_DEBUG_MESSAGES=y
@ -1409,7 +1412,7 @@ CONFIG_BLK_DEV_NVME=m
# #
# EEPROM support # EEPROM support
# #
# CONFIG_EEPROM_AT24 is not set CONFIG_EEPROM_AT24=y
# CONFIG_EEPROM_AT25 is not set # CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_LEGACY is not set # CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set # CONFIG_EEPROM_MAX6875 is not set
@ -1428,10 +1431,6 @@ CONFIG_BLK_DEV_NVME=m
# end of Texas Instruments shared transport line discipline # end of Texas Instruments shared transport line discipline
# CONFIG_SENSORS_LIS3_I2C is not set # CONFIG_SENSORS_LIS3_I2C is not set
#
# Altera FPGA firmware download module (requires I2C)
#
# CONFIG_ALTERA_STAPL is not set # CONFIG_ALTERA_STAPL is not set
# CONFIG_GENWQE is not set # CONFIG_GENWQE is not set
# CONFIG_ECHO is not set # CONFIG_ECHO is not set
@ -2120,12 +2119,14 @@ CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_BYD=y CONFIG_MOUSE_PS2_BYD=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
CONFIG_MOUSE_PS2_CYPRESS=y CONFIG_MOUSE_PS2_CYPRESS=y
CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set # CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set # CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set # CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_PS2_FOCALTECH=y CONFIG_MOUSE_PS2_FOCALTECH=y
CONFIG_MOUSE_PS2_SMBUS=y
# CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set # CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set # CONFIG_MOUSE_BCM5974 is not set
@ -2261,7 +2262,8 @@ CONFIG_DEVPORT=y
# #
# I2C support # I2C support
# #
CONFIG_I2C=m CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y CONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set # CONFIG_I2C_CHARDEV is not set
@ -2306,7 +2308,7 @@ CONFIG_I2C_ALGOBIT=m
# CONFIG_I2C_DESIGNWARE_PCI is not set # CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EMEV2 is not set # CONFIG_I2C_EMEV2 is not set
# CONFIG_I2C_GPIO is not set # CONFIG_I2C_GPIO is not set
# CONFIG_I2C_MICROCHIP_CORE is not set CONFIG_I2C_MICROCHIP_CORE=y
CONFIG_I2C_MV64XXX=m CONFIG_I2C_MV64XXX=m
# CONFIG_I2C_OCORES is not set # CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_PCA_PLATFORM is not set
@ -2419,6 +2421,7 @@ CONFIG_GENERIC_PINCONF=y
# CONFIG_PINCTRL_OCELOT is not set # CONFIG_PINCTRL_OCELOT is not set
# CONFIG_PINCTRL_SINGLE is not set # CONFIG_PINCTRL_SINGLE is not set
# CONFIG_PINCTRL_STMFX is not set # CONFIG_PINCTRL_STMFX is not set
# CONFIG_PINCTRL_SX150X is not set
# #
# Renesas pinctrl drivers # Renesas pinctrl drivers
@ -2839,7 +2842,11 @@ CONFIG_BCMA_POSSIBLE=y
# #
# CONFIG_MFD_ACT8945A is not set # CONFIG_MFD_ACT8945A is not set
# CONFIG_MFD_SUN4I_GPADC is not set # CONFIG_MFD_SUN4I_GPADC is not set
# CONFIG_MFD_AS3711 is not set
# CONFIG_MFD_SMPRO is not set # CONFIG_MFD_SMPRO is not set
# CONFIG_MFD_AS3722 is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_AAT2870_CORE is not set
# CONFIG_MFD_ATMEL_FLEXCOM is not set # CONFIG_MFD_ATMEL_FLEXCOM is not set
# CONFIG_MFD_ATMEL_HLCDC is not set # CONFIG_MFD_ATMEL_HLCDC is not set
# CONFIG_MFD_BCM590XX is not set # CONFIG_MFD_BCM590XX is not set
@ -2847,7 +2854,10 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_MFD_AXP20X_I2C is not set # CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_MADERA is not set # CONFIG_MFD_MADERA is not set
# CONFIG_MFD_MAX5970 is not set # CONFIG_MFD_MAX5970 is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_SPI is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set # CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DA9150 is not set
@ -2864,12 +2874,19 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set # CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set # CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set # CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77541 is not set
# CONFIG_MFD_MAX77620 is not set
# CONFIG_MFD_MAX77650 is not set # CONFIG_MFD_MAX77650 is not set
# CONFIG_MFD_MAX77686 is not set # CONFIG_MFD_MAX77686 is not set
# CONFIG_MFD_MAX77693 is not set # CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77714 is not set # CONFIG_MFD_MAX77714 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set # CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_MT6360 is not set # CONFIG_MFD_MT6360 is not set
# CONFIG_MFD_MT6370 is not set # CONFIG_MFD_MT6370 is not set
# CONFIG_MFD_MT6397 is not set # CONFIG_MFD_MT6397 is not set
@ -2886,9 +2903,11 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_MFD_RT4831 is not set # CONFIG_MFD_RT4831 is not set
# CONFIG_MFD_RT5033 is not set # CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RT5120 is not set # CONFIG_MFD_RT5120 is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_RK8XX_I2C is not set # CONFIG_MFD_RK8XX_I2C is not set
# CONFIG_MFD_RK8XX_SPI is not set # CONFIG_MFD_RK8XX_SPI is not set
# CONFIG_MFD_RN5T618 is not set # CONFIG_MFD_RN5T618 is not set
# CONFIG_MFD_SEC_CORE is not set
# CONFIG_MFD_SI476X_CORE is not set # CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set # CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set # CONFIG_MFD_SKY81452 is not set
@ -2898,28 +2917,44 @@ CONFIG_BCMA_POSSIBLE=y
CONFIG_MFD_SYSCON=y CONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not set # CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set # CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set # CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set # CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set # CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set # CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set # CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
# CONFIG_MFD_TPS65217 is not set # CONFIG_MFD_TPS65217 is not set
# CONFIG_MFD_TI_LP873X is not set # CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TI_LP87565 is not set # CONFIG_MFD_TI_LP87565 is not set
# CONFIG_MFD_TPS65218 is not set # CONFIG_MFD_TPS65218 is not set
# CONFIG_MFD_TPS65219 is not set # CONFIG_MFD_TPS65219 is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not set # CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS65912_SPI is not set # CONFIG_MFD_TPS65912_SPI is not set
# CONFIG_MFD_TPS6594_I2C is not set # CONFIG_MFD_TPS6594_I2C is not set
# CONFIG_MFD_TPS6594_SPI is not set # CONFIG_MFD_TPS6594_SPI is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_WL1273_CORE is not set # CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set # CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TC3589X is not set
# CONFIG_MFD_TQMX86 is not set # CONFIG_MFD_TQMX86 is not set
# CONFIG_MFD_VX855 is not set # CONFIG_MFD_VX855 is not set
# CONFIG_MFD_LOCHNAGAR is not set
# CONFIG_MFD_ARIZONA_I2C is not set # CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_ARIZONA_SPI is not set # CONFIG_MFD_ARIZONA_SPI is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_WM831X_SPI is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set # CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_ROHM_BD718XX is not set
# CONFIG_MFD_ROHM_BD71828 is not set
# CONFIG_MFD_ROHM_BD957XMUF is not set
# CONFIG_MFD_STPMIC1 is not set
# CONFIG_MFD_STMFX is not set # CONFIG_MFD_STMFX is not set
# CONFIG_MFD_ATC260X_I2C is not set # CONFIG_MFD_ATC260X_I2C is not set
# CONFIG_MFD_QCOM_PM8008 is not set # CONFIG_MFD_QCOM_PM8008 is not set
@ -3722,7 +3757,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_MAX6902 is not set # CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_PCF2123 is not set # CONFIG_RTC_DRV_PCF2123 is not set
# CONFIG_RTC_DRV_MCP795 is not set # CONFIG_RTC_DRV_MCP795 is not set
CONFIG_RTC_I2C_AND_SPI=m CONFIG_RTC_I2C_AND_SPI=y
# #
# SPI and I2C RTC drivers # SPI and I2C RTC drivers

@ -0,0 +1,48 @@
#!/bin/bash
CORES=$(getconf _NPROCESSORS_ONLN)
wdir=`pwd`
CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
cd ./linux/
echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs
KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' )
if [ -d "${wdir}/deploy/tmp/" ] ; then
rm -rf "${wdir}/deploy/tmp/"
fi
mkdir -p "${wdir}/deploy/tmp/"
make -s ARCH=riscv CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH="${wdir}/deploy/tmp"
if [ -f "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" ] ; then
rm -rf "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" || true
fi
echo "Compressing ${KERNEL_UTS}-modules.tar.gz..."
echo "${KERNEL_UTS}" > "${wdir}/deploy/.modules"
cd "${wdir}/deploy/tmp" || true
tar --create --gzip --file "../${KERNEL_UTS}-modules.tar.gz" ./*
cd "${wdir}/linux/" || exit
rm -rf "${wdir}/deploy/tmp" || true
if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ./.config ../patches/linux/mpfs_defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi
else
cp -v ./.config ../patches/linux/mainline/defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi
fi
if [ ! -d ../deploy/input/ ] ; then
mkdir -p ../deploy/input/ || true
fi
cp -v ./arch/riscv/boot/Image ../deploy/input/
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dtb ../deploy/input/
cd ../
#

@ -0,0 +1,50 @@
#!/bin/bash
CORES=$(getconf _NPROCESSORS_ONLN)
wdir=`pwd`
CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
cd ./linux/
make ARCH=riscv CROSS_COMPILE=${CC} menuconfig
echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs
KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' )
if [ -d "${wdir}/deploy/tmp/" ] ; then
rm -rf "${wdir}/deploy/tmp/"
fi
mkdir -p "${wdir}/deploy/tmp/"
make -s ARCH=riscv CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH="${wdir}/deploy/tmp"
if [ -f "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" ] ; then
rm -rf "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" || true
fi
echo "Compressing ${KERNEL_UTS}-modules.tar.gz..."
echo "${KERNEL_UTS}" > "${wdir}/deploy/.modules"
cd "${wdir}/deploy/tmp" || true
tar --create --gzip --file "../${KERNEL_UTS}-modules.tar.gz" ./*
cd "${wdir}/linux/" || exit
rm -rf "${wdir}/deploy/tmp" || true
if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ./.config ../patches/linux/mpfs_defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi
else
cp -v ./.config ../patches/linux/mainline/defconfig
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi
fi
if [ ! -d ../deploy/input/ ] ; then
mkdir -p ../deploy/input/ || true
fi
cp -v ./arch/riscv/boot/Image ../deploy/input/
cp -v ./arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dtb ../deploy/input/
cd ../
#
Loading…
Cancel
Save