diff --git a/README.md b/README.md index 00704295f7..4d638b3cbc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # OpenBMC -[![Build Status](https://openpower.xyz/buildStatus/icon?job=openbmc-build)](https://openpower.xyz/job/openbmc-build/) - The OpenBMC project can be described as a Linux distribution for embedded devices that have a BMC; typically, but not limited to, things like servers, top of rack switches or RAID appliances. The OpenBMC stack uses technologies @@ -15,23 +13,17 @@ customization for your server platform. ## Setting up your OpenBMC project ### 1) Prerequisite -- Ubuntu 14.04 +- Ubuntu 18.04 ``` sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat ``` -- Fedora 28 - -``` -sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake \ - rpcgen perl-Thread-Queue perl-bignum perl-Crypt-OpenSSL-Bignum -sudo dnf groupinstall "C Development Tools and Libraries" -``` ### 2) Download the source ``` -git clone git@github.com:openbmc/openbmc.git -cd openbmc +mkdir OpenBMC +cd OpenBMC +git clone https://github.com/AMDESE/OpenBMC.git . ``` ### 3) Target your hardware @@ -45,33 +37,13 @@ repository clone, and, if run without arguments, will display the list of supported hardware targets, see the following example: ``` -$ . setup [build_dir] -Target machine must be specified. Use one of: - -centriq2400-rep f0b fp5280g2 -gsj hr630 hr855xg2 -lanyang mihawk msn -neptune nicole olympus -olympus-nuvoton on5263m5 p10bmc -palmetto qemuarm quanta-q71l -romulus s2600wf stardragon4800-rep2 -swift tiogapass vesnin -witherspoon witherspoon-tacoma yosemitev2 -zaius +$ . setup +Target machine must be specified. ``` - -Once you know the target (e.g. romulus), source the `setup` script as follows: - -``` -. setup romulus build -``` - -For evb-ast2500, please use the below command to specify the machine config, -because the machine in `meta-aspeed` layer is in a BSP layer and does not -build the openbmc image. +Once you know the target (e.g. onyx), source the `setup` script as follows: ``` -TEMPLATECONF=meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf . openbmc-env +. setup sp5 ``` ### 4) Build @@ -90,32 +62,38 @@ to get up to speed on OpenBMC development out [here](https://github.com/openbmc/docs/blob/master/development/README.md) ## Build Validation and Testing -Commits submitted by members of the OpenBMC GitHub community are compiled and -tested via our [Jenkins](https://jenkins.openbmc.org/) server. Commits are run -through two levels of testing. At the repository level the makefile `make -check` directive is run. At the system level, the commit is built into a -firmware image and run with an arm-softmmu QEMU model against a barrage of -[CI tests](https://openpower.xyz/job/openbmc-test-qemu-ci/). - -Commits submitted by non-members do not automatically proceed through CI -testing. After visual inspection of the commit, a CI run can be manually -performed by the reviewer. - -Automated testing against the QEMU model along with supported systems are -performed. The OpenBMC project uses the -[Robot Framework](http://robotframework.org/) for all automation. Our -complete test repository can be found -[here](https://github.com/openbmc/openbmc-test-automation). +This contains bring up code to port OpenBMC on AMD's customer reference boards. +meta-sp5 supports boards: +1. Onyx +2. Quartz +3. Ruby +4. Titanite + +meta-sh5 supports boards: +1. sh5 d807 + +meta-sp6 supports boards: +1. Sunstone +2. Shale +3. Cinnabar + +meta-turin supports boards: +1. Chalupa +2. Galena +3. Huambo +4. Purico +5. Recluse +6. Volcano + +The builds are **beta** quality at this point in time. +Please check back for updates. ## Submitting Patches -Support of additional hardware and software packages is always welcome. -Please follow the [contributing guidelines](https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md) -when making a submission. It is expected that contributions contain test -cases. +AMD welcomes contributions. Please create pull requests to contribute: (https://github.com/AMDESE/OpenBMC/pulls) ## Bug Reporting -[Issues](https://github.com/openbmc/openbmc/issues) are managed on -GitHub. It is recommended you search through the issues before opening +[Issues](https://github.com/AMDESE/OpenBMC/issues) are managed on +GitHub. It is recommended you search through the issues before opening a new one. ## Questions @@ -128,51 +106,65 @@ For general questions, please use the openbmc tag on Please review the [discussion](https://meta.stackexchange.com/questions/272956/a-new-code-license-the-mit-this-time-with-attribution-required?cb=1) on Stack Overflow licensing before posting any code. -For technical discussions, please see [contact info](#contact) below for -Discord and mailing list information. Please don't file an issue to ask a -question. You'll get faster results by using the mailing list or Discord. - -## Features of OpenBMC - -**Feature List** -* Host management: Power, Cooling, LEDs, Inventory, Events, Watchdog -* Full IPMI 2.0 Compliance with DCMI -* Code Update Support for multiple BMC/BIOS images -* Web-based user interface -* REST interfaces -* D-Bus based interfaces -* SSH based SOL -* Remote KVM -* Hardware Simulation -* Automated Testing -* User management -* Virtual media - -**Features In Progress** -* OpenCompute Redfish Compliance -* Verified Boot - -**Features Requested but need help** -* OpenBMC performance monitoring - +For technical discussions, please see [contact info](#contact) below for IRC and +mailing list information. Please don't file an issue to ask a question. You'll +get faster results by using the mailing list or IRC. + +## Supported Features: + - WebUI + - System at a glance + - Network info + - Unique host name + - Control Interface + - IPMI (OOB) + - Redfish (OOB) + - SSH Console (BMC) + - Firmware Updates + - BMC (OOB) + - BIOS (OOB) + - CLEAR CMOS via script + - HAWAII FPGA (OOB) - Command line only, NO UI + - Onyx/Quartz FPGA (OOB) - Command line only, NO UI + - SOL Console + - webui + - ssh + - Power Control + - ON + - OFF + - State detection + - New WebUI + - webvue-ui + - Fan Control + - Adaptive fan Control + - KVM + - Keyboard, Video, Mouse + - VNC Client support + - APML + - CPU temperature sensors + - I3C tools supported + - Locator/Chassis ID LEDs + - Post Code Capture using eSPI + - Inband IPMI over KCS (eSPI) + - LCD Display + - Display Port Enablement + - BMC RAS + - BMC Crashdump + - Power Capping + - PMIC Error Injection + - MCTP Support + - CPER format data for RAS + - VR update + - Single CPER file for RAS Error + - FPGA dump script + +## Features in Progress: + - DIMM SPD, PMIC, RCD re-organization ## Finding out more Dive deeper into OpenBMC by opening the [docs](https://github.com/openbmc/docs) repository. -## Technical Steering Committee - -The Technical Steering Committee (TSC) guides the project. Members are: - - * Brad Bishop (chair), IBM - * Nancy Yuen, Google - * Sai Dasari, Facebook - * James Mihm, Intel - * Sagar Dharia, Microsoft - * Supreeth Venkatesh, Arm - ## Contact -- Mail: openbmc@lists.ozlabs.org [https://lists.ozlabs.org/listinfo/openbmc](https://lists.ozlabs.org/listinfo/openbmc) -- Discord: https://discord.gg/69Km47zH98 - +- Mail: openbmc@lists.ozlabs.org [https://lists.ozlabs.org/listinfo/openbmc](https://lists.ozlabs.org/listinfo/openbmc) with the subject "meta-amd" +- Alternatively, you can copy the maintainer: Supreeth Venkatesh diff --git a/meta-amd/meta-common/recipes-amd/amd-spdm/amd-spdm.bb b/meta-amd/meta-common/recipes-amd/amd-spdm/amd-spdm.bb deleted file mode 100644 index 153896ba4b..0000000000 --- a/meta-amd/meta-common/recipes-amd/amd-spdm/amd-spdm.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "libspdm" -DESCRIPTION = "Implementation of SPDM(DMTF DSP0274)" -LICENSE = "CLOSED" -FILESEXTRAPATHS_prepend := "${THISDIR}:" - -BB_STRICT_CHECKSUM = "0" -SRC_URI = "git://git@er.github.amd.com/RoT/proto-apps.git;branch=openbmc_release-0.8;protocol=ssh" -SRCREV = "${AUTOREV}" - -S="${WORKDIR}/git" - -DEPENDS = "openssl" - -# Export the arm-openssl path -export OPENSSL_ARM_DIR = "${WORKDIR}/recipe-sysroot/usr/lib" -export OPENSSL_INCLUDE_DIR = "${WORKDIR}/recipe-sysroot/usr/include" - -inherit cmake python3native - -EXTRA_OECMAKE = "-DAPP=spdm_requester -DPLAT_SHIM=arm-OpenBmc -DCOMPILER=arm-openbmc-linux-gnueabi" - - -do_patch_append() { - bb.build.exec_func('do_update_submodules', d) -} - -do_update_submodules () { - cd ${S} - python3 ${S}/scripts/git_module_update.py -} - -cmake_do_compile() { - cd ${S} - cmake -DAPP=spdm_requester -DPLAT_SHIM=arm-OpenBmc -DCOMPILER=arm-openbmc-linux-gnueabi -B${S}/release/ - make -C release VERBOSE=1 -} - -cmake_do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/release/spdm_requester.elf ${D}${bindir}/ -} - -INSANE_SKIP_${PN} += "ldflags" diff --git a/meta-amd/meta-common/recipes-amd/amd-yaap/amd-yaap.bb b/meta-amd/meta-common/recipes-amd/amd-yaap/amd-yaap.bb deleted file mode 100644 index 8f293cfa36..0000000000 --- a/meta-amd/meta-common/recipes-amd/amd-yaap/amd-yaap.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "AMD YAAPd Jtag server Application" -DESCRIPTION = "Yet Another AMD Protocol for Jtag communication with main Processor" - -LICENSE = "CLOSED" - -SRC_URI = "git://git@github.com/AMDESE/YAAP.git;branch=integ;protocol=ssh" - -SRCREV = "${AUTOREV}" - -S="${WORKDIR}/git" - -PV = "1.0+git${SRCPV}" - -# linux-libc-headers guides this way to include custom uapi headers -#CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -#CXXFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include" -#do_configure[depends] += "virtual/kernel:do_shared_workdir" - -do_compile() { - make -} - -do_install() { - install -d ${D}${bindir} - cp --preserve=mode,timestamps -R ${S}/Source/Linux/bmc/yaapd ${D}${bindir}/ - install -d ${D}/${systemd_unitdir}/system - install -m 0644 ${S}/yaapd.service ${D}/${systemd_unitdir}/system - install -d ${D}${sysconfdir}/${BPN}/1P - install -d ${D}${sysconfdir}/${BPN}/2P -} - -inherit systemd -SYSTEMD_SERVICE_${PN} += "yaapd.service \ - " -SYSTEMD_AUTO_ENABLE_${PN} = "disable" - -DEPENDS += "libgpiod" -DEPENDS += "boost" diff --git a/meta-amd/meta-common/recipes-amd/packagegroups/packagegroup-amd-apps.bb b/meta-amd/meta-common/recipes-amd/packagegroups/packagegroup-amd-apps.bb index 23d86d5c63..ca71bc2906 100644 --- a/meta-amd/meta-common/recipes-amd/packagegroups/packagegroup-amd-apps.bb +++ b/meta-amd/meta-common/recipes-amd/packagegroups/packagegroup-amd-apps.bb @@ -45,8 +45,6 @@ RDEPENDS_${PN}-system = " \ amd-lcd-lib \ amd-mctp-tool \ amd-ras \ - amd-spdm \ - amd-yaap \ auto-notify \ bmcweb \ cpu-info \ diff --git a/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0064-ARM-dts-aspeed-Add-MP-2857-PMBus-VR-driver.patch b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0064-ARM-dts-aspeed-Add-MP-2857-PMBus-VR-driver.patch new file mode 100755 index 0000000000..fd3414837c --- /dev/null +++ b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0064-ARM-dts-aspeed-Add-MP-2857-PMBus-VR-driver.patch @@ -0,0 +1,349 @@ +From 28c600a673448388360b18220d23316b7e083c43 Mon Sep 17 00:00:00 2001 +From: Andrew Peng +Date: Tue, 25 Jul 2023 16:25:25 +0800 +Subject: [PATCH] ARM:dts:aspeed: Add MP 2857 PMBus VR driver - Add MP 2857 + PMBus VR driver - Update purico dts file + +Signed-off-by: Andrew Peng +--- + arch/arm/boot/dts/aspeed-bmc-amd-purico.dts | 2 +- + drivers/hwmon/pmbus/mp2857.c | 224 +++++++++++++++++--- + 2 files changed, 195 insertions(+), 31 deletions(-) + mode change 100644 => 100755 arch/arm/boot/dts/aspeed-bmc-amd-purico.dts + mode change 100644 => 100755 drivers/hwmon/pmbus/mp2857.c + +diff --git a/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts b/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts +old mode 100644 +new mode 100755 +index 2ac25801e980..cd2080a6ea72 +--- a/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts +@@ -236,7 +236,7 @@ + + vddcr_vddio_33@63 { + //VDD 11 sus +- compatible = "isil,isl68137"; ++ compatible = "mps,mp2857"; + reg = <0x63>; + }; + }; +diff --git a/drivers/hwmon/pmbus/mp2857.c b/drivers/hwmon/pmbus/mp2857.c +old mode 100644 +new mode 100755 +index 8a573f0953d8..e6bee7e6c17c +--- a/drivers/hwmon/pmbus/mp2857.c ++++ b/drivers/hwmon/pmbus/mp2857.c +@@ -13,15 +13,27 @@ + #include + #include "pmbus.h" + +-#define MFR_VR_CONFIG2 0x5E ++#define IIN_EXP_POS 3 ++#define IIN_EXP_MSK (0x7 << IIN_EXP_POS) ++ ++#define IOUT_EXP_POS 0 ++#define IOUT_EXP_MSK (0x7 << IOUT_EXP_POS) ++ ++#define POUT_EXP_POS 6 ++#define POUT_EXP_MSK (0x1F << POUT_EXP_POS) ++ ++#define MFR_VR_CONFIG2 0x5E + + #define MP2857_PAGE_NUM 2 + + #define MP2857_RAIL1_FUNC (PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | \ +- PMBUS_HAVE_TEMP | PMBUS_HAVE_POUT) ++ PMBUS_HAVE_IOUT | PMBUS_HAVE_IIN | \ ++ PMBUS_HAVE_TEMP | PMBUS_HAVE_POUT | \ ++ PMBUS_PHASE_VIRTUAL) + +-#define MP2857_RAIL2_FUNC (PMBUS_HAVE_VOUT | PMBUS_HAVE_TEMP | \ +- PMBUS_HAVE_POUT) ++#define MP2857_RAIL2_FUNC (PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_TEMP | \ ++ PMBUS_HAVE_IOUT | PMBUS_HAVE_IIN | \ ++ PMBUS_HAVE_POUT | PMBUS_PHASE_VIRTUAL) + + struct mp2857_data { + struct pmbus_driver_info *info; +@@ -34,6 +46,7 @@ struct mp2857_data data; + static int read_word_data(struct i2c_client *client, int page, int reg) + { + int ret; ++ data.client.addr = client->addr; + ret = i2c_smbus_write_byte_data(&data.client, PMBUS_PAGE, page); + if (ret < 0) + return ret; +@@ -42,34 +55,72 @@ static int read_word_data(struct i2c_client *client, int page, int reg) + return ret; + } + ++static int write_word_data(struct i2c_client *client, int page, int reg, u16 data) ++{ ++ int ret; ++ ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, page); ++ if (ret < 0) ++ return ret; ++ ++ ret = i2c_smbus_write_word_data(client, reg, data); ++ if (ret < 0) ++ return ret; ++ ++ return ret; ++} ++ ++static int mp2857_config_exp(struct i2c_client *client, int page, int reg, u16 exp, u16 pos, u16 msk) ++{ ++ int ret; ++ ++ ret = read_word_data(client, page, reg); ++ if (ret < 0) ++ return ret; ++ ++ ret = (ret & ~msk) | (exp << pos); ++ ret = write_word_data(client, page, reg, ret); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ + static int + mp2857_read_vin(struct i2c_client *client, int page, int reg) + { + int ret; + ret = read_word_data(client, page, reg); +- printk(KERN_ALERT "Obtained data from MP2857, Vin-%d: %hx\n", page, ret); +- printk(KERN_ALERT "Converted data:\n"); ++ /* ++ * READ_VIN requires fixup to scale it to linear11 format. Register data format ++ * provides 10 bits for sensed Vin and 1 reserved bit and 5 bits for exponent. ++ * EXP fixed value 11100b 1/16=0.0625. ++ */ ++ //printk(KERN_ALERT "Obtained data from MP2857, Vin-%d: %hx %hx\n", page, ret, ret & GENMASK(9, 0)); ++ ret = ((ret & GENMASK(9, 0)) * 625) / 100; + ++ //printk(KERN_ALERT "Converted data:%x\n",ret); + return ret; + } + + static int + mp2857_read_vout(struct i2c_client *client, int page, int reg) + { +- int ret; +- ret = read_word_data(client, 0, MFR_VR_CONFIG2); +- printk(KERN_ALERT "Obtained data from MP2857, MFR_VR_CONFIG2-%d: %hx\n", page, ret); +- if ((ret & 0x0800) == 0) { +- ret = read_word_data(client, page, reg); +- printk(KERN_ALERT "Obtained data from MP2857, Vout-%d: %hx\n", page, ret); +- ret = ((ret & 0x3FF) * 5); +- } else { +- ret = read_word_data(client, page, reg); +- printk(KERN_ALERT "Obtained data from MP2857, Vout-%d: %hx\n", page, ret); +- ret = ((ret & 0x3FF) * 390625) / 100000; +- } +- printk(KERN_ALERT "Converted data:\n"); ++ /* ++ * The voltage report format is ++ * determined by 5Eh (on Page 0), bit[11]. ++ * If 5Eh, bit[11] = 0: VID mode. 5mV/LSB ++ * If 5Eh, bit[11] = 1: Linear mode. 3.90625mV/LSB ++ */ + ++ int ret; ++ ret = read_word_data(client, page, MFR_VR_CONFIG2); ++ if ((ret & 0x0800) == 0) { ++ ret = read_word_data(client, page, reg); ++ ret = ((ret & GENMASK(9, 0)) * 5); ++ } else { ++ ret = read_word_data(client, page, reg); ++ ret = ((ret & GENMASK(9, 0)) * 390625) / 100000; ++ } + return ret; + } + +@@ -78,9 +129,12 @@ mp2857_read_temperature(struct i2c_client *client, int page, int reg) + { + int ret; + ret = read_word_data(client, page, reg); +- printk(KERN_ALERT "Obtained data from MP2857, Temp-%d: %hx\n", page, ret); +- printk(KERN_ALERT "Converted data:\n"); +- ++ /* ++ * temperature requires fixup to scale it to linear11 format. Register data format ++ * provides 8 bits for temperature sensed and 3 bit SIGN and 5 bits for exponent. ++ * EXP value 00000b. ++ */ ++ ret &= GENMASK(7, 0); + return ret; + } + +@@ -89,14 +143,68 @@ mp2857_read_pout(struct i2c_client *client, int page, int reg) + { + int ret; + ret = read_word_data(client, page, reg); +- printk(KERN_ALERT "Obtained data from MP2857, Pout-%d: %hx\n", page, ret); +- printk(KERN_ALERT "Converted data:\n"); ++ /* ++ * POUT Register data format ++ * provides 11 bits for sensed IOUT and 5 bits for exponent. ++ * probe function set PWR_EXPONENT_BIT[10:6] 5b11100: (1/16) ++ * EXP value 1/16=0.0625. ++ */ ++ ret = ((ret & GENMASK(10, 0)) * 625) / 100; ++ return ret; ++} ++ ++static int ++mp2857_read_iout(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ ret = read_word_data(client, page, reg); ++ /* ++ * IOUT Register data format ++ * provides 11 bits for sensed IOUT and 5 bits for exponent. ++ * probe function set IIN_SCALE_SEL[5:3] 3b101: (1/16) A/LSB ++ * EXP value 1/16=0.0625. ++ */ ++ ret = ((ret & GENMASK(10, 0)) * 625) / 100; ++ return ret; ++} ++ ++static int ++mp2857_read_iin(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ if (page == 0) { ++ ret = read_word_data(client, page, 0x8E); ++ } else { ++ ret = read_word_data(client, page, reg); ++ } ++ /* ++ * IIN Register data format ++ * provides 11 bits for sensed IIN and 5 bits for exponent. ++ * probe function set IOUT_SCALE_SEL[2:0] 3b010: (1/16) A/LSB ++ * EXP value 1/16=0.0625. ++ */ ++ ret = ((ret & GENMASK(10, 0)) * 625) / 100; ++ return ret; ++} ++ ++static int mp2857_read_byte_data(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ ++ switch (reg) { ++ case PMBUS_VOUT_MODE: ++ ret = PB_VOUT_MODE_DIRECT; ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } + + return ret; + } + + static int mp2857_read_word_data(struct i2c_client *client, int page, int phase, +- int reg) ++ int reg) + { + int ret; + switch (reg) { +@@ -112,8 +220,14 @@ static int mp2857_read_word_data(struct i2c_client *client, int page, int phase, + case PMBUS_READ_POUT: + ret = mp2857_read_pout(client, page, reg); + break; ++ case PMBUS_READ_IIN: ++ ret = mp2857_read_iin(client, page, reg); ++ break; ++ case PMBUS_READ_IOUT: ++ ret = mp2857_read_iout(client, page, reg); ++ break; + default: +- ret = -ENODATA; ++ ret = -EINVAL; + break; + } + +@@ -123,24 +237,74 @@ static int mp2857_read_word_data(struct i2c_client *client, int page, int phase, + static struct pmbus_driver_info mp2857_info = { + .pages = MP2857_PAGE_NUM, + +- .format[PSC_VOLTAGE_IN] = linear, +- .format[PSC_VOLTAGE_OUT] = linear, +- .format[PSC_TEMPERATURE] = linear, +- .format[PSC_POWER] = linear, ++ .format[PSC_VOLTAGE_IN] = direct, ++ .format[PSC_VOLTAGE_OUT] = direct, ++ .format[PSC_TEMPERATURE] = direct, ++ .format[PSC_POWER] = direct, ++ .format[PSC_CURRENT_IN] = direct, ++ .format[PSC_CURRENT_OUT] = direct, + .m[PSC_VOLTAGE_OUT] = 1, + .R[PSC_VOLTAGE_OUT] = 3, + .b[PSC_VOLTAGE_OUT] = 0, ++ .m[PSC_TEMPERATURE] = 1, ++ .R[PSC_TEMPERATURE] = 3, ++ .b[PSC_TEMPERATURE] = 0, ++ .m[PSC_VOLTAGE_IN] = 1, ++ .R[PSC_VOLTAGE_IN] = 2, ++ .b[PSC_VOLTAGE_IN] = 0, ++ .m[PSC_POWER] = 1, ++ .R[PSC_POWER] = 2, ++ .b[PSC_POWER] = 0, ++ .m[PSC_CURRENT_IN] = 1, ++ .R[PSC_CURRENT_IN] = 2, ++ .b[PSC_CURRENT_IN] = 0, ++ .m[PSC_CURRENT_OUT] = 1, ++ .R[PSC_CURRENT_OUT] = 2, ++ .b[PSC_CURRENT_OUT] = 0, ++ + + .func[0] = MP2857_RAIL1_FUNC, + .func[1] = MP2857_RAIL2_FUNC, + .read_word_data = mp2857_read_word_data, ++ .read_byte_data = mp2857_read_byte_data, + }; + + static int mp2857_probe(struct i2c_client *client, const struct i2c_device_id *id) + { ++ int ret; + data.info = &mp2857_info; + data.client = *client; + ++ // config rail1 iin exp ++ ret = mp2857_config_exp(client, 2, 0x0B, 0x5, IIN_EXP_POS, IIN_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ ++ // config rail2 iin exp ++ ret = mp2857_config_exp(client, 2, 0x1B, 0x5, IIN_EXP_POS, IIN_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ ++ // config rail1 iout exp ++ ret = mp2857_config_exp(client, 2, 0x0B, 0x2, IOUT_EXP_POS, IOUT_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ ++ // config rail2 iout exp ++ ret = mp2857_config_exp(client, 2, 0x1B, 0x2, IOUT_EXP_POS, IOUT_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ ++ // config rail1 pout exp ++ ret = mp2857_config_exp(client, 2, 0x0B, 0x1C, POUT_EXP_POS, POUT_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ ++ // config rail2 pou exp ++ ret = mp2857_config_exp(client, 2, 0x1B, 0x1C, POUT_EXP_POS, POUT_EXP_MSK); ++ if (ret < 0) ++ return ret; ++ + return pmbus_do_probe(client, &mp2857_info); + } + +-- +2.17.1 + diff --git a/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0065-ARM-dts-aspeed-Modify-volcano-dts-to-support-E3.s-BP.patch b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0065-ARM-dts-aspeed-Modify-volcano-dts-to-support-E3.s-BP.patch new file mode 100755 index 0000000000..cb0c51a28b --- /dev/null +++ b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0065-ARM-dts-aspeed-Modify-volcano-dts-to-support-E3.s-BP.patch @@ -0,0 +1,153 @@ +From 78f83a66f06c27e1898403b4578516c4ae074194 Mon Sep 17 00:00:00 2001 +From: Andrew Peng +Date: Wed, 23 Aug 2023 14:45:05 +0800 +Subject: [PATCH] ARM:dts:aspeed: Modify volcano dts to support E3.s BP + + - Add pdb eeprom and two pca9545 i2c mux + - Add eeprom of E3.s BP + +Signed-off-by: Andrew Peng +--- + arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts | 94 +++++++++++++++++++- + 1 file changed, 92 insertions(+), 2 deletions(-) + mode change 100644 => 100755 arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts + +diff --git a/arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts b/arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts +old mode 100644 +new mode 100755 +index d042294f4dc3..0506b102981a +--- a/arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-amd-volcano.dts +@@ -36,12 +36,16 @@ + i2c250 = &BP1; //U134 + i2c251 = &BP2; + i2c252 = &BP3; +- i2c255 = &BP1_Crtl0; //U6 +- i2c256 = &BP1_Crtl1; ++ i2c255 = &BP1_Crtl0; //U6 E3S_1 ++ i2c256 = &BP1_Crtl1; // E3S_2 + i2c257 = &BP2_Crtl0; + i2c258 = &BP2_Crtl1; + i2c259 = &BP3_Crtl0; + i2c260 = &BP3_Crtl1; ++ i2c261 = &E3S_3_Crtl2; // E3s ++ i2c262 = &E3S_4_Crtl1; ++ i2c263 = &E3S_5_Crtl2; ++ i2c264 = &E3S_6_Crtl0; + }; + + chosen { +@@ -943,24 +947,110 @@ + pagesize = <32>; + }; + ++ pdb_eeprom: eeprom@53 { ++ compatible = "atmel,24c64"; ++ reg = <0x53>; ++ pagesize = <32>; ++ }; ++ + i2cswitch@71 { + compatible = "nxp,pca9545"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; ++ i2c-mux-idle-disconnect; + + // channel 0 connected to PSOC0 ++ //E3.s 1 + BP1_Crtl0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; ++ ++ E3S1_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; ++ + }; + + // channel 1 connected to PSOC1 ++ //E3.s 2 + BP1_Crtl1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; ++ ++ E3S2_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; ++ }; ++ ++ //E3.s 3 ++ E3S_3_Crtl2: i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ E3S3_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; ++ }; ++ ++ }; ++ ++ ++ i2cswitch@72 { ++ compatible = "nxp,pca9545"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x72>; ++ i2c-mux-idle-disconnect; ++ ++ // channel 0 connected to PSOC0 ++ //E3.s 6 ++ E3S_6_Crtl0: i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ E3S4_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; ++ }; ++ ++ // channel 1 connected to PSOC1 ++ //E3.s 4 ++ E3S_4_Crtl1: i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ E3S5_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; ++ }; ++ ++ //E3.s 5 ++ E3S_5_Crtl2: i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ E3S6_eeprom: eeprom@54 { ++ compatible = "atmel,24c32"; ++ reg = <0x54>; ++ pagesize = <32>; ++ }; + }; + }; + }; +-- +2.17.1 + diff --git a/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0066-ARM-dts-aspeed-Add-Vishay-sic458-pmbus-vr-driver.patch b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0066-ARM-dts-aspeed-Add-Vishay-sic458-pmbus-vr-driver.patch new file mode 100755 index 0000000000..e4e58e72cc --- /dev/null +++ b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed/0066-ARM-dts-aspeed-Add-Vishay-sic458-pmbus-vr-driver.patch @@ -0,0 +1,395 @@ +From 882cc6cc29cfdee32a6428fd4edd83d8f3705bf6 Mon Sep 17 00:00:00 2001 +From: Andrew Peng +Date: Tue, 21 Nov 2023 17:53:24 +0800 +Subject: [PATCH] ARM:dts:aspeed: Add Vishay sic458 pmbus vr driver + + - Add Vishay sic458 pmbus vr driver + - Update purico dts file + +Signed-off-by: Andrew Peng +--- + arch/arm/boot/dts/aspeed-bmc-amd-purico.dts | 31 +++ + drivers/hwmon/pmbus/Kconfig | 9 + + drivers/hwmon/pmbus/Makefile | 1 + + drivers/hwmon/pmbus/sic458.c | 282 ++++++++++++++++++++ + 4 files changed, 323 insertions(+) + mode change 100644 => 100755 drivers/hwmon/pmbus/Kconfig + mode change 100644 => 100755 drivers/hwmon/pmbus/Makefile + create mode 100755 drivers/hwmon/pmbus/sic458.c + +diff --git a/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts b/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts +index cd2080a6ea72..8e274b3952fc 100755 +--- a/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts ++++ b/arch/arm/boot/dts/aspeed-bmc-amd-purico.dts +@@ -204,6 +204,25 @@ + &i2c4 { + // Net name i2c1 + status = "okay"; ++ ++ p3V3@16 { ++ //P3V3 ++ compatible = "vishay,sic458"; ++ reg = <0x16>; ++ }; ++ ++ p5vaux@1d { ++ //P5V_AUX ++ compatible = "vishay,sic458"; ++ reg = <0x1d>; ++ }; ++ ++ pvdd18@1e { ++ //P3V3_AUX ++ compatible = "vishay,sic458"; ++ reg = <0x1e>; ++ }; ++ + }; + + // HPM CPU VRs +@@ -239,6 +258,18 @@ + compatible = "mps,mp2857"; + reg = <0x63>; + }; ++ ++ pvdd33@19 { ++ //pvdd 3.3 ++ compatible = "vishay,sic458"; ++ reg = <0x19>; ++ }; ++ ++ pvdd18@17 { ++ //pvdd 1.8 ++ compatible = "vishay,sic458"; ++ reg = <0x17>; ++ }; + }; + + }; +diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig +old mode 100644 +new mode 100755 +index 435dae59527f..8379333890e6 +--- a/drivers/hwmon/pmbus/Kconfig ++++ b/drivers/hwmon/pmbus/Kconfig +@@ -238,6 +238,15 @@ config SENSORS_PXE1610 + This driver can also be built as a module. If so, the module will + be called pxe1610. + ++config SENSORS_SIC458 ++ tristate "Vishay SIC458" ++ help ++ If you say yes here you get hardware monitoring support for Vishay ++ SIC458 Controller. ++ ++ This driver can also be built as a module. If so, the module will ++ be called sic458. ++ + config SENSORS_TPS40422 + tristate "TI TPS40422" + help +diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile +old mode 100644 +new mode 100755 +index c957d51ef630..c7a3925494e9 +--- a/drivers/hwmon/pmbus/Makefile ++++ b/drivers/hwmon/pmbus/Makefile +@@ -27,6 +27,7 @@ obj-$(CONFIG_SENSORS_MAX8688) += max8688.o + obj-$(CONFIG_SENSORS_MP2975) += mp2975.o + obj-$(CONFIG_SENSORS_MP2857) += mp2857.o + obj-$(CONFIG_SENSORS_PXE1610) += pxe1610.o ++obj-$(CONFIG_SENSORS_SIC458) += sic458.o + obj-$(CONFIG_SENSORS_TPS40422) += tps40422.o + obj-$(CONFIG_SENSORS_TPS53679) += tps53679.o + obj-$(CONFIG_SENSORS_UCD9000) += ucd9000.o +diff --git a/drivers/hwmon/pmbus/sic458.c b/drivers/hwmon/pmbus/sic458.c +new file mode 100755 +index 000000000000..eb16d7f3c52c +--- /dev/null ++++ b/drivers/hwmon/pmbus/sic458.c +@@ -0,0 +1,282 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Hardware monitoring driver for Vishay Multi-phase Digital VR Controllers(SIC458) ++ * ++ * Copyright (C) 2023 MPS ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "pmbus.h" ++ ++#define DEBUG 0 ++#define BIT10 0x0400 ++#define SIC458_PAGE_NUM 1 ++#define SIC458_FUNC (PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | \ ++ PMBUS_HAVE_IOUT | PMBUS_HAVE_IIN | \ ++ PMBUS_HAVE_TEMP | PMBUS_HAVE_POUT) ++ ++ ++struct sic458_data { ++ struct pmbus_driver_info *info; ++ struct i2c_client client; ++ int vid_step[SIC458_PAGE_NUM]; ++}; ++ ++static struct sic458_data data; ++ ++static int read_word_data(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ data.client.addr = client->addr; ++ ret = i2c_smbus_read_word_data(&data.client, reg); ++ ++ return ret; ++} ++ ++static int ++sic458_read_vin(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ s16 exponent; ++ s32 mantissa; ++ ret = read_word_data(client, page, reg); ++ /* ++ * READ_VIN requires fixup to scale it to linear11 format. Register data format ++ * provides 11 bits for sensed IOUT and 5 bits for exponent. ++ * ++ */ ++ exponent = ~(((s16)ret) >> 11)+1; ++ mantissa = (s16)(ret & GENMASK(10, 0)); ++ ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, Vin: ret:%hx, exp:%hx, mantissa:%hx\n", ret, exponent , mantissa); ++ ret = mantissa * 1000 / (1 << exponent); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int ++sic458_read_vout(struct i2c_client *client, int page, int reg) ++{ ++ /* ++ * The voltage report format is LINEAR16 ++ * M × 2^-9 ++ * range 0 V to 48 V ++ */ ++ int ret; ++ ret = read_word_data(client, page, reg); ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, Vout-%d: %hx \n", page, ret); ++ ret = ret * 1000 / (1 << 9); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int ++sic458_read_temperature(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ s16 exponent; ++ s32 mantissa; ++ ret = read_word_data(client, page, reg); ++ /* ++ * temperature requires fixup to scale it to linear11 format. Register data format ++ * provides 11 bits for sensed temperature and 5 bits for exponent. ++ * ++ */ ++ exponent = ~(((s16)ret) >> 11)+1; ++ mantissa = (s16)(ret & GENMASK(10, 0)); ++ ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, temperature: ret:%hx, exp:%hx, mantissa:%hx\n", ret, exponent , mantissa); ++ ret = mantissa / (1 << exponent); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int ++sic458_read_pout(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ s16 exponent; ++ s32 mantissa; ++ ret = read_word_data(client, page, reg); ++ /* ++ * pout requires fixup to scale it to linear11 format. Register data format ++ * provides 11 bits for sensed pout and 5 bits for exponent. ++ * ++ */ ++ exponent = ~(((s16)ret) >> 11)+1; ++ mantissa = (s16)(ret & GENMASK(10, 0)); ++ ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, pout: ret:%hx, exp:%hx, mantissa:%hx\n", ret, exponent , mantissa); ++ ret = mantissa * 1000 / (1 << exponent); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int ++sic458_read_iout(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ s16 exponent; ++ s32 mantissa; ++ ret = read_word_data(client, page, reg); ++ /* ++ * iout requires fixup to scale it to linear11 format. Register data format ++ * provides 11 bits for sensed iout and 5 bits for exponent. ++ * ++ */ ++ exponent = ~(((s16)ret) >> 11)+1; ++ mantissa = (s16)(ret & GENMASK(10, 0)); ++ ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, iout: ret:%hx, exp:%hx, mantissa:%hx\n", ret, exponent , mantissa); ++ ret = mantissa * 1000 / (1 << exponent); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int ++sic458_read_iin(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ s16 exponent; ++ s32 mantissa; ++ ret = read_word_data(client, page, reg); ++ /* ++ * iin requires fixup to scale it to linear11 format. Register data format ++ * provides 11 bits for sensed iin and 5 bits for exponent. ++ * ++ */ ++ exponent = ~(((s16)ret) >> 11)+1; ++ mantissa = (s16)(ret & GENMASK(10, 0)); ++ ++ if(DEBUG) printk(KERN_ALERT "Obtained data from SIC458, iin: ret:%hx, exp:%hx, mantissa:%hx\n", ret, exponent , mantissa); ++ ret = mantissa * 1000 / (1 << exponent); ++ ++ if(DEBUG) printk(KERN_ALERT "Converted data:%x\n",ret); ++ return ret; ++} ++ ++static int sic458_read_byte_data(struct i2c_client *client, int page, int reg) ++{ ++ int ret; ++ ++ switch (reg) { ++ case PMBUS_VOUT_MODE: ++ ret = PB_VOUT_MODE_DIRECT; ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ ++ return ret; ++} ++ ++static int sic458_read_word_data(struct i2c_client *client, int page, int phase, ++ int reg) ++{ ++ int ret; ++ switch (reg) { ++ case PMBUS_READ_VIN: ++ ret = sic458_read_vin(client, page, reg); ++ break; ++ case PMBUS_READ_VOUT: ++ ret = sic458_read_vout(client, page, reg); ++ break; ++ case PMBUS_READ_TEMPERATURE_1: ++ ret = sic458_read_temperature(client, page, reg); ++ break; ++ case PMBUS_READ_POUT: ++ ret = sic458_read_pout(client, page, reg); ++ break; ++ case PMBUS_READ_IIN: ++ ret = sic458_read_iin(client, page, reg); ++ break; ++ case PMBUS_READ_IOUT: ++ ret = sic458_read_iout(client, page, reg); ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ ++ return ret; ++} ++ ++static struct pmbus_driver_info sic458_info = { ++ .pages = SIC458_PAGE_NUM, ++ ++ .format[PSC_VOLTAGE_IN] = direct, ++ .format[PSC_VOLTAGE_OUT] = direct, ++ .format[PSC_TEMPERATURE] = direct, ++ .format[PSC_POWER] = direct, ++ .format[PSC_CURRENT_IN] = direct, ++ .format[PSC_CURRENT_OUT] = direct, ++ .m[PSC_VOLTAGE_OUT] = 1, ++ .R[PSC_VOLTAGE_OUT] = 3, ++ .b[PSC_VOLTAGE_OUT] = 0, ++ .m[PSC_TEMPERATURE] = 1, ++ .R[PSC_TEMPERATURE] = 3, ++ .b[PSC_TEMPERATURE] = 0, ++ .m[PSC_VOLTAGE_IN] = 1, ++ .R[PSC_VOLTAGE_IN] = 3, ++ .b[PSC_VOLTAGE_IN] = 0, ++ .m[PSC_POWER] = 1, ++ .R[PSC_POWER] = 3, ++ .b[PSC_POWER] = 0, ++ .m[PSC_CURRENT_IN] = 1, ++ .R[PSC_CURRENT_IN] = 3, ++ .b[PSC_CURRENT_IN] = 0, ++ .m[PSC_CURRENT_OUT] = 1, ++ .R[PSC_CURRENT_OUT] = 3, ++ .b[PSC_CURRENT_OUT] = 0, ++ ++ ++ .func[0] = SIC458_FUNC, ++ .read_word_data = sic458_read_word_data, ++ .read_byte_data = sic458_read_byte_data, ++}; ++ ++static int sic458_probe(struct i2c_client *client, const struct i2c_device_id *id) ++{ ++ ++ data.info = &sic458_info; ++ data.client = *client; ++ return pmbus_do_probe(client, &sic458_info); ++} ++ ++static const struct i2c_device_id sic458_id[] = { ++ {"sic458", 0}, ++ {} ++}; ++MODULE_DEVICE_TABLE(i2c, sic458_id); ++ ++static const struct of_device_id sic458_of_match[] = { ++ {.compatible = "vishay,sic458"}, ++ {} ++}; ++MODULE_DEVICE_TABLE(of, sic458_of_match); ++ ++static struct i2c_driver sic458_driver = { ++ .driver = { ++ .name = "sic458", ++ .of_match_table = sic458_of_match, ++ }, ++ .probe = sic458_probe, ++ .id_table = sic458_id, ++}; ++ ++module_i2c_driver(sic458_driver); ++ ++MODULE_AUTHOR("Andrew Peng "); ++MODULE_DESCRIPTION("PMBus driver for Vishay SIC458 device"); ++MODULE_LICENSE("GPL"); +-- +2.17.1 + diff --git a/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend old mode 100644 new mode 100755 index 1237724f80..6818ffdf25 --- a/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend +++ b/meta-amd/meta-common/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -64,4 +64,7 @@ SRC_URI += "file://amd-bmc-baseline.cfg \ file://0061-ARM-dts-aspeed-Add-eSPI-peripheral-and-flash-channel.patch \ file://0062-DTS-changes-to-map-GPIO-line-P0_PRESENT_L-and-P1_PRE.patch \ file://0063-ARM-dts-aspeed-Enabled-BMC-device-for-I3c-DTS-file.patch \ + file://0064-ARM-dts-aspeed-Add-MP-2857-PMBus-VR-driver.patch \ + file://0065-ARM-dts-aspeed-Modify-volcano-dts-to-support-E3.s-BP.patch \ + file://0066-ARM-dts-aspeed-Add-Vishay-sic458-pmbus-vr-driver.patch \ " diff --git a/meta-amd/meta-g304/conf/bblayers.conf.sample b/meta-amd/meta-g304/conf/bblayers.conf.sample deleted file mode 100644 index c619e08273..0000000000 --- a/meta-amd/meta-g304/conf/bblayers.conf.sample +++ /dev/null @@ -1,29 +0,0 @@ -# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -LCONF_VERSION = "8" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-amd \ - ##OEROOT##/meta-amd/meta-g304 \ - " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-amd \ - ##OEROOT##/meta-amd/meta-g304 \ - " diff --git a/meta-amd/meta-g304/conf/conf-notes.txt b/meta-amd/meta-g304/conf/conf-notes.txt deleted file mode 100644 index 9b3c01a556..0000000000 --- a/meta-amd/meta-g304/conf/conf-notes.txt +++ /dev/null @@ -1,2 +0,0 @@ -Common targets are: - obmc-phosphor-image diff --git a/meta-amd/meta-g304/conf/layer.conf b/meta-amd/meta-g304/conf/layer.conf deleted file mode 100644 index 28f2bd7470..0000000000 --- a/meta-amd/meta-g304/conf/layer.conf +++ /dev/null @@ -1,12 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "g304-layer" -BBFILE_PATTERN_g304-layer = "^${LAYERDIR}/" -BBFILE_PRIORITY_g304-layer = "6" - -LAYERSERIES_COMPAT_g304-layer = "gatesgarth hardknott" diff --git a/meta-amd/meta-g304/conf/local.conf.sample b/meta-amd/meta-g304/conf/local.conf.sample deleted file mode 100644 index 9de651d79b..0000000000 --- a/meta-amd/meta-g304/conf/local.conf.sample +++ /dev/null @@ -1,238 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "g304" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "openbmc-phosphor" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK/ADT target architecture -# -# This variable specifies the architecture to build SDK/ADT items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -SANITY_TESTED_DISTROS_append ?= " RedHatEnterpriseWorkstation-6.*" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, exmap, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES = "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# - 'image-swab' to perform host system intrusion detection -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necessary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS = "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. This assumes there is a -# libsdl library available on your build system. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" diff --git a/meta-amd/meta-g304/conf/machine/g304.conf b/meta-amd/meta-g304/conf/machine/g304.conf deleted file mode 100644 index 2b7156fa21..0000000000 --- a/meta-amd/meta-g304/conf/machine/g304.conf +++ /dev/null @@ -1,22 +0,0 @@ - -KMACHINE = "aspeed" -KERNEL_DEVICETREE = "${KMACHINE}-bmc-amd-g304.dtb \ - " - -UBOOT_MACHINE_g304 = "ast2600_openbmc_defconfig" -UBOOT_DEVICETREE = "ast2600-hawaii" - -require conf/machine/include/ast2600.inc -require conf/machine/include/obmc-bsp-common.inc - -SERIAL_CONSOLES = "115200;ttyS4" - -FLASH_SIZE = "131072" - -OBMC_MACHINE_FEATURES += "\ - obmc-bmc-state-mgmt \ - " - -OVERRIDES .= ":amd" - - diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0001-common-main.c-Hardcode-G304-SMC-hostname.patch b/meta-amd/meta-g304/recipes-bsp/u-boot/files/0001-common-main.c-Hardcode-G304-SMC-hostname.patch deleted file mode 100644 index 5182ec1e63..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0001-common-main.c-Hardcode-G304-SMC-hostname.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c7c77a14c8b58fc6ee0e5ba22e35b794ecb6b84b Mon Sep 17 00:00:00 2001 -Message-Id: -From: Vinu Vaghasia -Date: Tue, 21 Mar 2023 10:41:57 -0500 -Subject: [PATCH] common/main.c: Hardcode G304 SMC hostname - -1. Hardcoded G304 SMC hostname. - -Signed-off-by: Supreeth Venkatesh -Signed-off-by: Vinu Vaghasia ---- - common/image-fit.c | 2 +- - common/main.c | 10 +++++++++- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/common/image-fit.c b/common/image-fit.c -index fa5f141a81..6fcd314128 100644 ---- a/common/image-fit.c -+++ b/common/image-fit.c -@@ -1977,7 +1977,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr, - sprintf((char *)fit_uname_config, "conf-aspeed-bmc-amd-quartz.dtb"); - break; - } // switch -- -+ sprintf((char *)fit_uname_config, "conf-aspeed-bmc-amd-g304.dtb"); - cfg_noffset = fit_conf_get_node(fit, - fit_uname_config); - } -diff --git a/common/main.c b/common/main.c -index 1a98b3ea21..caf2dacaa1 100644 ---- a/common/main.c -+++ b/common/main.c -@@ -175,7 +175,15 @@ void set_hostname() - printf("Hostname set to '%s'\n", hostname); - } - else -- printf("Failed setting hostname, board_id or ethaddr is not set\n"); -+ { -+ octate_5 = (int)simple_strtol(ðaddr[OCTATE_5_OFFSET], NULL, HEX_BASE); -+ octate_6 = (int)simple_strtol(ðaddr[OCTATE_6_OFFSET], NULL, HEX_BASE); -+ sprintf(hostname, "g304-%02x%02x", octate_5, octate_6); -+ sprintf(new_bootargs, "%s systemd.hostname=%s", cur_bootargs, hostname); -+ env_set("bootargs", new_bootargs); -+ env_save(); -+ printf("Hostname set to '%s'\n", hostname); -+ } - } - else - printf("Hostname is already set with bootargs\n"); --- -2.17.1 - diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0002-u-boot-aspped-Modify-u-boot-code-to-support-G304-platform.patch b/meta-amd/meta-g304/recipes-bsp/u-boot/files/0002-u-boot-aspped-Modify-u-boot-code-to-support-G304-platform.patch deleted file mode 100644 index a64bfdaeb0..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0002-u-boot-aspped-Modify-u-boot-code-to-support-G304-platform.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 5740afa79c8d10e92c8050df77c19b4ddd710491 Mon Sep 17 00:00:00 2001 -Message-Id: <5740afa79c8d10e92c8050df77c19b4ddd710491.1681233514.git.vinu.vaghasia@amd.com> -From: Vinu Vaghasia -Date: Tue, 11 Apr 2023 12:18:07 -0500 -Subject: [PATCH] u-boot-aspped: Modify u-boot code to support G304 platform - devices - -- Hawaii dts modified to disapbe qspi and reduce frequency -- GPIOV4 and GPIOI5 enabled by setting SCU51C[10]=0 -- JEDEC code added for is25wp256 - -Signed-off-by: Vinu Vaghasia ---- - arch/arm/dts/ast2600-hawaii.dts | 31 +++++++++++++++++++------------ - common/main.c | 12 ++++++++++++ - drivers/mtd/spi/spi-nor-ids.c | 3 +++ - 3 files changed, 34 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/dts/ast2600-hawaii.dts b/arch/arm/dts/ast2600-hawaii.dts -index 7db50325c8..0ac05e26e6 100644 ---- a/arch/arm/dts/ast2600-hawaii.dts -+++ b/arch/arm/dts/ast2600-hawaii.dts -@@ -100,33 +100,40 @@ - - // FPGA and BIOS FLASH - -+#if 0 - &spi1 { - status = "okay"; -- - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1quad_default>; -+ pinctrl-0 = <&pinctrl_spi1_default >; - - flash@0 { -- compatible = "spi-flash"; - status = "okay"; -- spi-max-frequency = <50000000>; -- spi-tx-bus-width = <4>; -- spi-rx-bus-width = <4>; -+ spi-max-frequency = <500000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@1 { -+ status = "okay"; -+ spi-max-frequency = <500000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; - }; -+ -+ - }; -+#endif - - &spi2 { - status = "okay"; -- - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2quad_default>; -+ pinctrl-0 = <&pinctrl_spi2_default>; - - flash@0 { -- compatible = "spi-flash"; - status = "okay"; -- spi-max-frequency = <50000000>; -- spi-tx-bus-width = <4>; -- spi-rx-bus-width = <4>; -+ spi-max-frequency = <10000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; - }; - }; - -diff --git a/common/main.c b/common/main.c -index caf2dacaa1..7e4d72cec0 100644 ---- a/common/main.c -+++ b/common/main.c -@@ -26,6 +26,9 @@ - #define SIX_DIMM_PER_BUS 6 - #define TMP_BUF_LEN 8 - -+#define ASPEED_SYS_SCU_HW_STRAP3 0x1e6e251C // Hardware Strap3 -+#define HW_STRAP3_MASK 0xFFFFFBFF // Bit# 10 -+ - /* - * Board-specific Platform code can reimplement show_boot_progress () if needed - */ -@@ -252,6 +255,8 @@ static void run_preboot_environment_command(void) - void main_loop(void) - { - const char *s; -+ u32 scu_val; -+ - u32 por_rst = readl(ASPEED_SYS_SCRATCH_1FC); - - bootstage_mark_name(BOOTSTAGE_ID_MAIN_LOOP, "main_loop"); -@@ -277,6 +282,13 @@ void main_loop(void) - /* Read board id from eerpom and set env */ - set_board_id(); - set_hostname(); -+ -+ /* Set Hardware Strap3 reg */ -+ scu_val = readl(ASPEED_SYS_SCU_HW_STRAP3); -+ scu_val = scu_val & (u32)HW_STRAP3_MASK; -+ writel(scu_val, ASPEED_SYS_SCU_HW_STRAP3); -+ printf("HWStrap3 = 0x%08x\n",scu_val); -+ - s = bootdelay_process(); - if (cli_process_fdt(&s)) - cli_secure_boot_cmd(s); -diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c -index 5882eab2e3..b824a36aa4 100644 ---- a/drivers/mtd/spi/spi-nor-ids.c -+++ b/drivers/mtd/spi/spi-nor-ids.c -@@ -152,6 +152,9 @@ const struct flash_info spi_nor_ids[] = { - SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { INFO("is25wp128", 0x9d7018, 0, 64 * 1024, 256, - SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+ { INFO("is25wp256", 0x9d7019, 0, 64 * 1024, 512, -+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, -+ - #endif - #ifdef CONFIG_SPI_FLASH_MACRONIX /* MACRONIX */ - /* Macronix */ --- -2.17.1 - diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0003-u-boot-aspeed-sdk-Modify-dts-for-SPI-frequency.patch b/meta-amd/meta-g304/recipes-bsp/u-boot/files/0003-u-boot-aspeed-sdk-Modify-dts-for-SPI-frequency.patch deleted file mode 100644 index 3675a6d632..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0003-u-boot-aspeed-sdk-Modify-dts-for-SPI-frequency.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 741ba4112ab65f6c6119a7c175cdbdd269824a1b Mon Sep 17 00:00:00 2001 -Message-Id: <741ba4112ab65f6c6119a7c175cdbdd269824a1b.1683323633.git.vinu.vaghasia@amd.com> -From: Vinu Vaghasia -Date: Fri, 5 May 2023 16:41:38 -0500 -Subject: [PATCH] u-boot-aspeed-sdk: Modify dts for SPI frequency and applided - Aspeed bug fix - -- SPI frequency set to 1MHz -- As per Aspeed: - - The SPI clock frequency in the device tree is adopted from probe - SPI flash stage instead of after timing calibration. - - aspeed: Fix bug for lower SPI clock frequency - When SPI clock frequency is lower than 12.5MHz, u-boot - will hang before access SPI flash. - -Signed-off-by: Vinu Vaghasia ---- - arch/arm/dts/ast2600-hawaii.dts | 12 ++++++------ - drivers/spi/aspeed_spi.c | 15 ++++++++++++++- - 2 files changed, 20 insertions(+), 7 deletions(-) - -diff --git a/arch/arm/dts/ast2600-hawaii.dts b/arch/arm/dts/ast2600-hawaii.dts -index 0ac05e26e6..96143d1462 100644 ---- a/arch/arm/dts/ast2600-hawaii.dts -+++ b/arch/arm/dts/ast2600-hawaii.dts -@@ -99,8 +99,6 @@ - }; - - // FPGA and BIOS FLASH -- --#if 0 - &spi1 { - status = "okay"; - pinctrl-names = "default"; -@@ -108,21 +106,22 @@ - - flash@0 { - status = "okay"; -- spi-max-frequency = <500000000>; -+ compatible = "spi-flash", "is,25wp256"; -+ spi-max-frequency = <1000000>; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - }; - - flash@1 { - status = "okay"; -- spi-max-frequency = <500000000>; -+ compatible = "spi-flash", "is,25wp256"; -+ spi-max-frequency = <1000000>; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - }; - - - }; --#endif - - &spi2 { - status = "okay"; -@@ -131,7 +130,8 @@ - - flash@0 { - status = "okay"; -- spi-max-frequency = <10000000>; -+ compatible = "spi-flash", "is,25wp256"; -+ spi-max-frequency = <1000000>; - spi-tx-bus-width = <1>; - spi-rx-bus-width = <1>; - }; -diff --git a/drivers/spi/aspeed_spi.c b/drivers/spi/aspeed_spi.c -index f93200f8f6..66c12081a5 100644 ---- a/drivers/spi/aspeed_spi.c -+++ b/drivers/spi/aspeed_spi.c -@@ -104,6 +104,7 @@ struct aspeed_spi_regs { - - #define SPI_READ_FROM_FLASH 0x00000001 - #define SPI_WRITE_TO_FLASH 0x00000002 -+#define CE_CTRL_FREQ_MASK 0xf0fff0ff - - /* Auto Soft-Reset Command Control */ - #define SOFT_RST_CMD_EN GENMASK(1, 0) -@@ -216,7 +217,7 @@ static u32 aspeed_g6_spi_hclk_divisor(struct aspeed_spi_priv *priv, u32 max_hz) - u32 i, j = 0; - u32 hclk_div_setting = 0; - -- for (j = 0; j < 0xf; i++) { -+ for (j = 0; j < 0xf; j++) { - for (i = 0; i < ARRAY_SIZE(hclk_masks); i++) { - base_div = j * 16; - if (max_hz >= (hclk_rate / ((i + 1) + base_div))) { -@@ -991,6 +992,8 @@ static int aspeed_spi_claim_bus(struct udevice *dev) - struct aspeed_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); - struct aspeed_spi_flash *flash; -+ struct spi_slave *slave = dev_get_parent_priv(dev); -+ u32 read_hclk; - - debug("%s: claim bus CS%u\n", bus->name, slave_plat->cs); - -@@ -998,6 +1001,16 @@ static int aspeed_spi_claim_bus(struct udevice *dev) - if (!flash) - return -ENODEV; - -+ if (priv->new_ver) { -+ if (dev_read_bool(bus, "timing-calibration-disabled")) { -+ read_hclk = aspeed_g6_spi_hclk_divisor(priv, slave->speed); -+ flash->ce_ctrl_user &= CE_CTRL_FREQ_MASK; -+ flash->ce_ctrl_user |= CE_G6_CTRL_CLOCK_FREQ(read_hclk); -+ flash->ce_ctrl_fread &= CE_CTRL_FREQ_MASK; -+ flash->ce_ctrl_fread |= CE_G6_CTRL_CLOCK_FREQ(read_hclk); -+ } -+ } -+ - return aspeed_spi_flash_init(priv, flash, dev); - } - --- -2.17.1 - diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0004-u-boot-aspeed-sdk-Modify-i2c-driver-to-unlock-the-i2c-frequency.patch b/meta-amd/meta-g304/recipes-bsp/u-boot/files/0004-u-boot-aspeed-sdk-Modify-i2c-driver-to-unlock-the-i2c-frequency.patch deleted file mode 100644 index 5f344b7925..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/files/0004-u-boot-aspeed-sdk-Modify-i2c-driver-to-unlock-the-i2c-frequency.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8753bd8a5470739cbccc60528578b132f6026ae0 Mon Sep 17 00:00:00 2001 -Message-Id: <8753bd8a5470739cbccc60528578b132f6026ae0.1683661446.git.vinu.vaghasia@amd.com> -From: Vinu Vaghasia -Date: Tue, 9 May 2023 14:41:15 -0500 -Subject: [PATCH] u-boot-aspeed-sdk: Modify i2c driver to unlock the i2c - frequency settings - -- I2CD_M_SCL_DRIVE_EN removed to unlock the i2c frequency settings. -- This allows to changed the i2c frequency from u-boot by setting the -REGs. -- This change needed for G304 I2C testing at various speeds. - -Signed-off-by: Vinu Vaghasia ---- - drivers/i2c/ast_i2c.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c -index bbc32d6cdb..13420ade84 100644 ---- a/drivers/i2c/ast_i2c.c -+++ b/drivers/i2c/ast_i2c.c -@@ -73,7 +73,7 @@ static void ast_i2c_init_bus(struct udevice *dev) - /* Enable Master Mode. Assuming single-master */ - writel(I2CD_MASTER_EN - | I2CD_M_SDA_LOCK_EN -- | I2CD_MULTI_MASTER_DIS | I2CD_M_SCL_DRIVE_EN, -+ | I2CD_MULTI_MASTER_DIS, - &priv->regs->fcr); - /* Enable Interrupts */ - writel(I2CD_INTR_TX_ACK --- -2.17.1 - diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/files/amd-g304-u-boot.cfg b/meta-amd/meta-g304/recipes-bsp/u-boot/files/amd-g304-u-boot.cfg deleted file mode 100644 index 51f613ccde..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/files/amd-g304-u-boot.cfg +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_CMD_SPI=y -CONFIG_SPI_FLASH_SST=y -CONFIG_SPI_FLASH_ISSI=y -CONFIG_SF_DEFAULT_SPEED=1000000 diff --git a/meta-amd/meta-g304/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-amd/meta-g304/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend deleted file mode 100644 index 441be30638..0000000000 --- a/meta-amd/meta-g304/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://amd-g304-u-boot.cfg \ - file://0001-common-main.c-Hardcode-G304-SMC-hostname.patch \ - file://0002-u-boot-aspped-Modify-u-boot-code-to-support-G304-platform.patch \ - file://0003-u-boot-aspeed-sdk-Modify-dts-for-SPI-frequency.patch \ - file://0004-u-boot-aspeed-sdk-Modify-i2c-driver-to-unlock-the-i2c-frequency.patch \ - " diff --git a/meta-amd/meta-lipari/classes/image_types_phosphor.bbclass b/meta-amd/meta-lipari/classes/image_types_phosphor.bbclass deleted file mode 100644 index dde5423141..0000000000 --- a/meta-amd/meta-lipari/classes/image_types_phosphor.bbclass +++ /dev/null @@ -1,574 +0,0 @@ -# Base image class extension, inlined into every image. - -inherit image_version - -# Phosphor image types -# -# Phosphor OpenBMC supports a fixed partition mtd layout, -# A dynamic mtd with ubi layout, and a tar file for use with -# The reference BMC software update implementation. - -# Image composition -FLASH_KERNEL_IMAGE ?= "fitImage-${INITRAMFS_IMAGE}-${MACHINE}-${MACHINE}" -FLASH_KERNEL_IMAGE_df-obmc-ubi-fs ?= "fitImage-${MACHINE}.bin" - -IMAGE_BASETYPE ?= "squashfs-xz" -OVERLAY_BASETYPE ?= "jffs2" -FLASH_UBI_BASETYPE ?= "${IMAGE_BASETYPE}" -FLASH_UBI_OVERLAY_BASETYPE ?= "ubifs" -FLASH_EXT4_BASETYPE ?= "ext4" -FLASH_EXT4_OVERLAY_BASETYPE ?= "ext4" - -IMAGE_TYPES += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar mmc-ext4-tar" - -IMAGE_TYPEDEP_mtd-static = "${IMAGE_BASETYPE}" -IMAGE_TYPEDEP_mtd-static-tar = "${IMAGE_BASETYPE}" -IMAGE_TYPEDEP_mtd-static-alltar = "mtd-static" -IMAGE_TYPEDEP_mtd-ubi = "${FLASH_UBI_BASETYPE}" -IMAGE_TYPEDEP_mtd-ubi-tar = "${FLASH_UBI_BASETYPE}" -IMAGE_TYPEDEP_mmc-ext4-tar = "${FLASH_EXT4_BASETYPE}" -IMAGE_TYPES_MASKED += "mtd-static mtd-static-alltar mtd-static-tar mtd-ubi mtd-ubi-tar mmc-ext4-tar" - -# Flash characteristics in KB unless otherwise noted -DISTROOVERRIDES .= ":flash-${FLASH_SIZE}" -FLASH_SIZE ?= "32768" -FLASH_PEB_SIZE ?= "64" -# Flash page and overhead sizes in bytes -FLASH_PAGE_SIZE ?= "1" -FLASH_NOR_UBI_OVERHEAD ?= "64" - -# Fixed partition offsets -FLASH_UBOOT_SPL_SIZE ?= "64" -FLASH_UBOOT_OFFSET ?= "0" -FLASH_KERNEL_OFFSET ?= "512" -FLASH_KERNEL_OFFSET_flash-65536 ?= "1024" -FLASH_KERNEL_OFFSET_flash-131072 ?= "1024" -FLASH_UBI_OFFSET ?= "${FLASH_KERNEL_OFFSET}" -FLASH_ROFS_OFFSET ?= "4864" -FLASH_ROFS_OFFSET_flash-65536 ?= "10240" -FLASH_ROFS_OFFSET_flash-131072 ?= "10240" -FLASH_RWFS_OFFSET ?= "28672" -FLASH_RWFS_OFFSET_flash-65536 ?= "43008" -FLASH_RWFS_OFFSET_flash-131072 ?= "98304" - -# UBI volume sizes in KB unless otherwise noted. -FLASH_UBI_RWFS_SIZE ?= "6144" -FLASH_UBI_RWFS_SIZE_flash-131072 ?= "32768" -FLASH_UBI_RWFS_TXT_SIZE ?= "6MiB" -FLASH_UBI_RWFS_TXT_SIZE_flash-131072 ?= "32MiB" - -# eMMC sizes in KB unless otherwise noted. -MMC_UBOOT_SIZE ?= "1024" -MMC_BOOT_PARTITION_SIZE ?= "65536" - -SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv" -INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}" -SIGNING_KEY_DEPENDS = "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native:do_populate_sysroot', '', d)}" - -VERSION_PURPOSE ?= "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" - -UBOOT_SUFFIX ?= "bin" - -python() { - # Compute rwfs LEB count and LEB size. - page_size = d.getVar('FLASH_PAGE_SIZE', True) - nor_overhead_size = d.getVar('FLASH_NOR_UBI_OVERHEAD', True) - overhead_size = max(int(page_size), int(nor_overhead_size)) - peb_size = d.getVar('FLASH_PEB_SIZE', True) - leb_size = (int(peb_size) * 1024) - (2 * overhead_size) - d.setVar('FLASH_LEB_SIZE', str(leb_size)) # In bytes - - rwfs_size = d.getVar('FLASH_UBI_RWFS_SIZE', True) - rwfs_size = int(rwfs_size) * 1024 - lebs = int((rwfs_size + leb_size - 1) / leb_size) # Rounding up - d.setVar('FLASH_UBI_RWFS_LEBS', str(lebs)) -} - -# Allow rwfs mkfs configuration through OVERLAY_MKFS_OPTS and OVERRIDES. However, -# avoid setting 'ext4' or 'jffs2' in OVERRIDES as such raw filesystem types are -# reserved for the primary image (and setting them currently breaks the build). -# Instead, prefix the overlay override value with 'rwfs-' to avoid collisions. -DISTROOVERRIDES .= ":static-rwfs-${OVERLAY_BASETYPE}" -DISTROOVERRIDES .= ":ubi-rwfs-${FLASH_UBI_OVERLAY_BASETYPE}" -DISTROOVERRIDES .= ":mmc-rwfs-${FLASH_EXT4_OVERLAY_BASETYPE}" - -JFFS2_RWFS_CMD = "mkfs.jffs2 --root=jffs2 --faketime --output=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.jffs2" -UBIFS_RWFS_CMD = "mkfs.ubifs -r ubifs -c ${FLASH_UBI_RWFS_LEBS} -m ${FLASH_PAGE_SIZE} -e ${FLASH_LEB_SIZE} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubifs" -EXT4_RWFS_CMD = "mkfs.ext4 -F ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4" - -FLASH_STATIC_RWFS_CMD_static-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" -FLASH_UBI_RWFS_CMD_ubi-rwfs-jffs2 = "${JFFS2_RWFS_CMD}" -FLASH_UBI_RWFS_CMD_ubi-rwfs-ubifs = "${UBIFS_RWFS_CMD}" -FLASH_EXT4_RWFS_CMD_mmc-rwfs-ext4 = "${EXT4_RWFS_CMD}" - -mk_empty_image() { - image_dst="$1" - image_size_kb=$2 - dd if=/dev/zero bs=1k count=$image_size_kb \ - | tr '\000' '\377' > $image_dst -} - -mk_empty_image_zeros() { - image_dst="$1" - image_size_kb=$2 - dd if=/dev/zero of=$image_dst bs=1k count=$image_size_kb -} - -clean_rwfs() { - type=$1 - shift - - rm -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type - rm -rf $type - mkdir $type -} - -make_rwfs() { - type=$1 - cmd=$2 - shift - shift - opts="$@" - - mkdir -p $type - - $cmd $opts -} - -do_generate_rwfs_static() { - clean_rwfs ${OVERLAY_BASETYPE} - make_rwfs ${OVERLAY_BASETYPE} "${FLASH_STATIC_RWFS_CMD}" ${OVERLAY_MKFS_OPTS} -} -do_generate_rwfs_static[dirs] = " ${S}/static" -do_generate_rwfs_static[depends] += " \ - mtd-utils-native:do_populate_sysroot \ - " - -do_generate_rwfs_ubi() { - clean_rwfs ${FLASH_UBI_OVERLAY_BASETYPE} - make_rwfs ${FLASH_UBI_OVERLAY_BASETYPE} "${FLASH_UBI_RWFS_CMD}" -} -do_generate_rwfs_ubi[dirs] = " ${S}/ubi" -do_generate_rwfs_ubi[depends] += " \ - mtd-utils-native:do_populate_sysroot \ - " - -do_generate_rwfs_ext4() { - clean_rwfs rwfs.${FLASH_EXT4_OVERLAY_BASETYPE} - mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.ext4 1024 - make_rwfs ${FLASH_EXT4_OVERLAY_BASETYPE} "${FLASH_EXT4_RWFS_CMD}" ${OVERLAY_MKFS_OPTS} -} -do_generate_rwfs_ext4[dirs] = " ${S}/ext4" -do_generate_rwfs_ext4[depends] += " \ - e2fsprogs-native:do_populate_sysroot \ - " - -add_volume() { - config_file=$1 - vol_id=$2 - vol_type=$3 - vol_name=$4 - image=$5 - vol_size=$6 - - echo \[$vol_name\] >> $config_file - echo mode=ubi >> $config_file - echo image=$image >> $config_file - echo vol_type=$vol_type >> $config_file - echo vol_name=$vol_name >> $config_file - echo vol_id=$vol_id >> $config_file - if [ ! -z $vol_size ]; then - echo vol_size=$vol_size >> $config_file - fi -} - -python do_generate_ubi() { - version_id = do_get_versionID(d) - d.setVar('VERSION_ID', version_id) - bb.build.exec_func("do_make_ubi", d) -} -do_generate_ubi[dirs] = "${S}/ubi" -do_generate_ubi[depends] += " \ - ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - mtd-utils-native:do_populate_sysroot \ - " - -do_make_ubi() { - cfg=ubinize-${IMAGE_NAME}.cfg - rm -f $cfg ubi-img - # Construct the ubinize config file - add_volume $cfg 0 static kernel-${VERSION_ID} \ - ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} - - add_volume $cfg 1 static rofs-${VERSION_ID} \ - ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_BASETYPE} - - add_volume $cfg 2 dynamic rwfs ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_RWFS_TXT_SIZE} - - # Build the ubi partition image - ubinize -p ${FLASH_PEB_SIZE}KiB -m ${FLASH_PAGE_SIZE} -o ubi-img $cfg - - # Concatenate the uboot and ubi partitions - mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd ${FLASH_SIZE} - dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \ - if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \ - of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd - dd bs=1k conv=notrunc seek=${FLASH_UBI_OFFSET} \ - if=ubi-img \ - of=${IMGDEPLOYDIR}/${IMAGE_NAME}.ubi.mtd - - cd ${IMGDEPLOYDIR} - ln -sf ${IMAGE_NAME}.ubi.mtd ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubi.mtd -} -do_make_ubi[dirs] = "${S}/ubi" -do_make_ubi[depends] += " \ - ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - mtd-utils-native:do_populate_sysroot \ - " - -do_mk_static_nor_image() { - # Assemble the flash image - mk_empty_image ${IMGDEPLOYDIR}/${IMAGE_NAME}.static.mtd ${FLASH_SIZE} -} - -do_generate_image_uboot_file() { - image_dst="$1" - uboot_offset=${FLASH_UBOOT_OFFSET} - - if [ ! -z ${SPL_BINARY} ]; then - dd bs=1k conv=notrunc seek=${FLASH_UBOOT_OFFSET} \ - if=${DEPLOY_DIR_IMAGE}/u-boot-spl.${UBOOT_SUFFIX} \ - of=${image_dst} - uboot_offset=${FLASH_UBOOT_SPL_SIZE} - fi - - dd bs=1k conv=notrunc seek=${uboot_offset} \ - if=${DEPLOY_DIR_IMAGE}/u-boot.${UBOOT_SUFFIX} \ - of=${image_dst} -} - -python do_generate_static() { - import subprocess - - bb.build.exec_func("do_mk_static_nor_image", d) - - nor_image = os.path.join(d.getVar('IMGDEPLOYDIR', True), - '%s.static.mtd' % d.getVar('IMAGE_NAME', True)) - - def _append_image(imgpath, start_kb, finish_kb): - imgsize = os.path.getsize(imgpath) - maxsize = (finish_kb - start_kb) * 1024 - bb.debug(1, 'Considering file size=' + str(imgsize) + ' name=' + imgpath) - bb.debug(1, 'Spanning start=' + str(start_kb) + 'K end=' + str(finish_kb) + 'K') - bb.debug(1, 'Compare needed=' + str(imgsize) + ' available=' + str(maxsize) + ' margin=' + str(maxsize - imgsize)) - if imgsize > maxsize: - bb.fatal("Image '%s' is too large!" % imgpath) - - subprocess.check_call(['dd', 'bs=1k', 'conv=notrunc', - 'seek=%d' % start_kb, - 'if=%s' % imgpath, - 'of=%s' % nor_image]) - - uboot_offset = int(d.getVar('FLASH_UBOOT_OFFSET', True)) - - spl_binary = d.getVar('SPL_BINARY', True) - if spl_binary: - _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), - 'u-boot-spl.%s' % d.getVar('UBOOT_SUFFIX',True)), - int(d.getVar('FLASH_UBOOT_OFFSET', True)), - int(d.getVar('FLASH_UBOOT_SPL_SIZE', True))) - uboot_offset += int(d.getVar('FLASH_UBOOT_SPL_SIZE', True)) - - _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), - 'u-boot.%s' % d.getVar('UBOOT_SUFFIX',True)), - uboot_offset, - int(d.getVar('FLASH_KERNEL_OFFSET', True))) - - _append_image(os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), - d.getVar('FLASH_KERNEL_IMAGE', True)), - int(d.getVar('FLASH_KERNEL_OFFSET', True)), - int(d.getVar('FLASH_ROFS_OFFSET', True))) - - _append_image(os.path.join(d.getVar('IMGDEPLOYDIR', True), - '%s.%s' % ( - d.getVar('IMAGE_LINK_NAME', True), - d.getVar('IMAGE_BASETYPE', True))), - int(d.getVar('FLASH_ROFS_OFFSET', True)), - int(d.getVar('FLASH_RWFS_OFFSET', True))) - - _append_image(os.path.join(d.getVar('IMGDEPLOYDIR', True), - '%s.%s' % ( - d.getVar('IMAGE_LINK_NAME', True), - d.getVar('OVERLAY_BASETYPE', True))), - int(d.getVar('FLASH_RWFS_OFFSET', True)), - int(d.getVar('FLASH_SIZE', True))) - - bb.build.exec_func("do_mk_static_symlinks", d) -} - -do_mk_static_symlinks() { - cd ${IMGDEPLOYDIR} - ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd - - # Maintain non-standard legacy links - do_generate_image_uboot_file ${IMGDEPLOYDIR}/image-u-boot - ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/flash-${MACHINE} - ln -sf ${IMAGE_NAME}.static.mtd ${IMGDEPLOYDIR}/image-bmc - ln -sf ${FLASH_KERNEL_IMAGE} ${IMGDEPLOYDIR}/image-kernel - ln -sf ${IMAGE_LINK_NAME}.${IMAGE_BASETYPE} ${IMGDEPLOYDIR}/image-rofs - ln -sf ${IMAGE_LINK_NAME}.${OVERLAY_BASETYPE} ${IMGDEPLOYDIR}/image-rwfs -} -do_generate_static[dirs] = "${S}/static" -do_generate_static[depends] += " \ - ${PN}:do_image_${@d.getVar('IMAGE_BASETYPE', True).replace('-', '_')} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - " - -make_signatures() { - signature_files="" - for file in "$@"; do - openssl dgst -sha256 -sign ${SIGNING_KEY} -out "${file}.sig" $file - signature_files="${signature_files} ${file}.sig" - done - - if [ -n "$signature_files" ]; then - sort_signature_files=`echo "$signature_files" | tr ' ' '\n' | sort | tr '\n' ' '` - cat $sort_signature_files > image-full - openssl dgst -sha256 -sign ${SIGNING_KEY} -out image-full.sig image-full - signature_files="${signature_files} image-full.sig" - rm -rf image-full - fi -} - -do_generate_static_alltar() { - ln -sf ${S}/MANIFEST MANIFEST - ln -sf ${S}/publickey publickey - ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd image-bmc - - make_signatures image-bmc MANIFEST publickey - - tar -h -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}.static.mtd.all.tar \ - image-bmc MANIFEST publickey ${signature_files} - - cd ${IMGDEPLOYDIR} - - ln -sf ${IMAGE_NAME}.static.mtd.all.tar \ - ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.static.mtd.all.tar - - # Maintain non-standard legacy link. - ln -sf ${IMAGE_NAME}.static.mtd.all.tar \ - ${IMGDEPLOYDIR}/${MACHINE}-${DATETIME}.all.tar - -} -do_generate_static_alltar[vardepsexclude] = "DATETIME" -do_generate_static_alltar[dirs] = "${S}/static" -do_generate_static_alltar[depends] += " \ - openssl-native:do_populate_sysroot \ - ${SIGNING_KEY_DEPENDS} \ - ${PN}:do_copy_signing_pubkey \ - " - -make_image_links() { - rwfs=$1 - rofs=$2 - shift - shift - - # Create some links to help make the tar archive in the format - # expected by phosphor-bmc-code-mgmt. - do_generate_image_uboot_file image-u-boot - ln -sf ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} image-kernel - ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rofs image-rofs - ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$rwfs image-rwfs -} - -make_tar_of_images() { - type=$1 - shift - extra_files="$@" - - # Create the tar archive - tar -h -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type.tar \ - image-u-boot image-kernel image-rofs image-rwfs $extra_files - - cd ${IMGDEPLOYDIR} - ln -sf ${IMAGE_NAME}.$type.tar ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type.tar -} - -do_generate_static_tar() { - ln -sf ${S}/MANIFEST MANIFEST - ln -sf ${S}/publickey publickey - make_image_links ${OVERLAY_BASETYPE} ${IMAGE_BASETYPE} - make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey - make_tar_of_images static.mtd MANIFEST publickey ${signature_files} - - # Maintain non-standard legacy link. - cd ${IMGDEPLOYDIR} - ln -sf ${IMAGE_NAME}.static.mtd.tar ${IMGDEPLOYDIR}/${MACHINE}-${DATETIME}.tar -} -do_generate_static_tar[dirs] = " ${S}/static" -do_generate_static_tar[depends] += " \ - ${PN}:do_image_${@d.getVar('IMAGE_BASETYPE', True).replace('-', '_')} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - openssl-native:do_populate_sysroot \ - ${SIGNING_KEY_DEPENDS} \ - ${PN}:do_copy_signing_pubkey \ - " -do_generate_static_tar[vardepsexclude] = "DATETIME" - -do_generate_ubi_tar() { - ln -sf ${S}/MANIFEST MANIFEST - ln -sf ${S}/publickey publickey - make_image_links ${FLASH_UBI_OVERLAY_BASETYPE} ${FLASH_UBI_BASETYPE} - make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey - make_tar_of_images ubi.mtd MANIFEST publickey ${signature_files} -} -do_generate_ubi_tar[dirs] = " ${S}/ubi" -do_generate_ubi_tar[depends] += " \ - ${PN}:do_image_${@d.getVar('FLASH_UBI_BASETYPE', True).replace('-', '_')} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - openssl-native:do_populate_sysroot \ - ${SIGNING_KEY_DEPENDS} \ - ${PN}:do_copy_signing_pubkey \ - " - -do_generate_ext4_tar() { - # Generate the U-Boot image - mk_empty_image_zeros image-u-boot ${MMC_UBOOT_SIZE} - do_generate_image_uboot_file image-u-boot - - # Generate a compressed ext4 filesystem with the fitImage file in it to be - # flashed to the boot partition of the eMMC - install -d boot-image - install -m 644 ${DEPLOY_DIR_IMAGE}/${FLASH_KERNEL_IMAGE} boot-image/fitImage - mk_empty_image_zeros boot-image.${FLASH_EXT4_BASETYPE} ${MMC_BOOT_PARTITION_SIZE} - mkfs.ext4 -F -i 4096 -d boot-image boot-image.${FLASH_EXT4_BASETYPE} - # Error codes 0-3 indicate successfull operation of fsck - fsck.ext4 -pvfD boot-image.${FLASH_EXT4_BASETYPE} || [ $? -le 3 ] - zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} boot-image.${FLASH_EXT4_BASETYPE} > boot-image.${FLASH_EXT4_BASETYPE}.zst - - # Generate the compressed ext4 rootfs - zstd -f -k -T0 -c ${ZSTD_COMPRESSION_LEVEL} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE} > ${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE}.zst - - ln -sf boot-image.${FLASH_EXT4_BASETYPE}.zst image-kernel - ln -sf ${IMAGE_LINK_NAME}.${FLASH_EXT4_BASETYPE}.zst image-rofs - ln -sf ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.rwfs.${FLASH_EXT4_OVERLAY_BASETYPE} image-rwfs - ln -sf ${S}/MANIFEST MANIFEST - ln -sf ${S}/publickey publickey - - hostfw_update_file="${DEPLOY_DIR_IMAGE}/hostfw/update/image-hostfw" - if [ -e "${hostfw_update_file}" ]; then - ln -sf "${hostfw_update_file}" image-hostfw - make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey image-hostfw - make_tar_of_images ext4.mmc MANIFEST publickey ${signature_files} image-hostfw - else - make_signatures image-u-boot image-kernel image-rofs image-rwfs MANIFEST publickey - make_tar_of_images ext4.mmc MANIFEST publickey ${signature_files} - fi -} -do_generate_ext4_tar[dirs] = " ${S}/ext4" -do_generate_ext4_tar[depends] += " \ - zstd-native:do_populate_sysroot \ - ${PN}:do_image_${FLASH_EXT4_BASETYPE} \ - virtual/kernel:do_deploy \ - u-boot:do_deploy \ - openssl-native:do_populate_sysroot \ - ${SIGNING_KEY_DEPENDS} \ - ${PN}:do_copy_signing_pubkey \ - phosphor-hostfw-image:do_deploy \ - " - -def get_pubkey_basedir(d): - return os.path.join( - d.getVar('STAGING_DIR_TARGET', True), - d.getVar('sysconfdir', True).strip(os.sep), - 'activationdata') - -def get_pubkey_type(d): - return os.listdir(get_pubkey_basedir(d))[0] - -def get_pubkey_path(d): - return os.path.join( - get_pubkey_basedir(d), - get_pubkey_type(d), - 'publickey') - -python do_generate_phosphor_manifest() { - purpose = d.getVar('VERSION_PURPOSE', True) - version = do_get_version(d) - target_machine = d.getVar('MACHINE', True) - extended_version = (d.getVar('EXTENDED_VERSION', True) or "") - with open('MANIFEST', 'w') as fd: - fd.write('purpose={}\n'.format(purpose)) - fd.write('version={}\n'.format(version.strip('"'))) - fd.write('ExtendedVersion={}\n'.format(extended_version)) - fd.write('KeyType={}\n'.format(get_pubkey_type(d))) - fd.write('HashType=RSA-SHA256\n') - fd.write('MachineName={}\n'.format(target_machine)) -} -do_generate_phosphor_manifest[dirs] = "${S}" -do_generate_phosphor_manifest[depends] += " \ - os-release:do_populate_sysroot \ - phosphor-image-signing:do_populate_sysroot \ - " - -python do_copy_signing_pubkey() { - with open(get_pubkey_path(d), 'r') as read_fd: - with open('publickey', 'w') as write_fd: - write_fd.write(read_fd.read()) -} - -do_copy_signing_pubkey[dirs] = "${S}" -do_copy_signing_pubkey[depends] += " \ - phosphor-image-signing:do_populate_sysroot \ - " - -addtask copy_signing_pubkey after do_rootfs -addtask generate_phosphor_manifest after do_rootfs -addtask generate_rwfs_static after do_rootfs -addtask generate_rwfs_ubi after do_rootfs -addtask generate_rwfs_ext4 after do_rootfs - -python() { - types = d.getVar('IMAGE_FSTYPES', True).split() - - if any([x in types for x in ['mtd-static', 'mtd-static-alltar']]): - bb.build.addtask( - 'do_generate_static', - 'do_image_complete', - 'do_generate_rwfs_static', d) - if 'mtd-static-alltar' in types: - bb.build.addtask( - 'do_generate_static_alltar', - 'do_image_complete', - 'do_generate_static do_generate_phosphor_manifest', d) - if 'mtd-static-tar' in types: - bb.build.addtask( - 'do_generate_static_tar', - 'do_image_complete', - 'do_generate_rwfs_static do_generate_phosphor_manifest', d) - - if 'mtd-ubi' in types: - bb.build.addtask( - 'do_generate_ubi', - 'do_image_complete', - 'do_generate_rwfs_ubi', d) - if 'mtd-ubi-tar' in types: - bb.build.addtask( - 'do_generate_ubi_tar', - 'do_image_complete', - 'do_generate_rwfs_ubi do_generate_phosphor_manifest', d) - - if 'mmc-ext4-tar' in types: - bb.build.addtask( - 'do_generate_ext4_tar', - 'do_image_complete', - 'do_generate_rwfs_ext4 do_generate_phosphor_manifest', d) -} diff --git a/meta-amd/meta-lipari/conf/bblayers.conf.sample b/meta-amd/meta-lipari/conf/bblayers.conf.sample deleted file mode 100644 index 512bef6f32..0000000000 --- a/meta-amd/meta-lipari/conf/bblayers.conf.sample +++ /dev/null @@ -1,32 +0,0 @@ -# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -LCONF_VERSION = "8" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ##OEROOT##/meta-amd/meta-lipari \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-amd \ - " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-evb/meta-evb-aspeed/meta-evb-ast2600 \ - " diff --git a/meta-amd/meta-lipari/conf/conf-notes.txt b/meta-amd/meta-lipari/conf/conf-notes.txt deleted file mode 100644 index 9b3c01a556..0000000000 --- a/meta-amd/meta-lipari/conf/conf-notes.txt +++ /dev/null @@ -1,2 +0,0 @@ -Common targets are: - obmc-phosphor-image diff --git a/meta-amd/meta-lipari/conf/layer.conf b/meta-amd/meta-lipari/conf/layer.conf deleted file mode 100644 index 61e661064d..0000000000 --- a/meta-amd/meta-lipari/conf/layer.conf +++ /dev/null @@ -1,11 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "lipari" -BBFILE_PATTERN_lipari = "^${LAYERDIR}/" - -LAYERSERIES_COMPAT_lipari = "gatesgarth hardknott" diff --git a/meta-amd/meta-lipari/conf/local.conf.sample b/meta-amd/meta-lipari/conf/local.conf.sample deleted file mode 100644 index 4874d7060a..0000000000 --- a/meta-amd/meta-lipari/conf/local.conf.sample +++ /dev/null @@ -1,23 +0,0 @@ -MACHINE ??= "lipari-ast2600" -DISTRO ?= "openbmc-phosphor" -PACKAGE_CLASSES ?= "package_rpm" -SANITY_TESTED_DISTROS_append ?= " *" -EXTRA_IMAGE_FEATURES = "debug-tweaks" -USER_CLASSES ?= "buildstats image-mklibs image-prelink" -PATCHRESOLVE = "noop" -BB_DISKMON_DIRS = "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" -CONF_VERSION = "1" -INHERIT += "extrausers" -EXTRA_USERS_PARAMS = " \ - usermod -p '\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/' root; \ - " - -require conf/machine/include/obmc-bsp-common.inc diff --git a/meta-amd/meta-lipari/conf/machine/distro/include/uboot-distrovars.inc b/meta-amd/meta-lipari/conf/machine/distro/include/uboot-distrovars.inc deleted file mode 100644 index 81dcd3e5ac..0000000000 --- a/meta-amd/meta-lipari/conf/machine/distro/include/uboot-distrovars.inc +++ /dev/null @@ -1 +0,0 @@ -OVERRIDES .= ":uboot-flash-${FLASH_SIZE}" diff --git a/meta-amd/meta-lipari/conf/machine/lipari-ast2600.conf b/meta-amd/meta-lipari/conf/machine/lipari-ast2600.conf deleted file mode 100644 index a311d6e864..0000000000 --- a/meta-amd/meta-lipari/conf/machine/lipari-ast2600.conf +++ /dev/null @@ -1,16 +0,0 @@ -KERNEL_DEVICETREE = "aspeed-ast2600-lipari.dtb" -UBOOT_MACHINE = "ast2600-lipari_spl_defconfig" -UBOOT_DEVICETREE = "ast2600-lipari" -SPL_BINARY = "spl/u-boot-spl.bin" - -SOCSEC_SIGN_ENABLE = "0" - -require conf/machine/include/ast2600.inc - -SERIAL_CONSOLES = "115200;ttyS4" -# AST2600 EVB has 64MB SPI flash -FLASH_SIZE = "65536" - -MACHINEOVERRIDES =. "lipari-ast2600:" - -MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-liparigpio" diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0001-lipari-spl-defconfig.patch b/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0001-lipari-spl-defconfig.patch deleted file mode 100644 index 8812bea01a..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0001-lipari-spl-defconfig.patch +++ /dev/null @@ -1,158 +0,0 @@ -From afbaf8f4afc98b361008d4e14d2ec4445b55bd9c Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Thu, 2 Mar 2023 04:33:49 +0000 -Subject: [PATCH] lipari-defconfigs - ---- - configs/ast2600-lipari_spl_defconfig | 139 +++++++++++++++++++++++++++ - 1 file changed, 139 insertions(+) - create mode 100644 configs/ast2600-lipari_spl_defconfig - -diff --git a/configs/ast2600-lipari_spl_defconfig b/configs/ast2600-lipari_spl_defconfig -new file mode 100644 -index 0000000000..832b64239d ---- /dev/null -+++ b/configs/ast2600-lipari_spl_defconfig -@@ -0,0 +1,139 @@ -+CONFIG_ARM=y -+CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl" -+CONFIG_SYS_DCACHE_OFF=y -+CONFIG_POSITION_INDEPENDENT=y -+CONFIG_SPL_SYS_THUMB_BUILD=y -+CONFIG_SYS_THUMB_BUILD=y -+CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds" -+CONFIG_ARCH_ASPEED=y -+CONFIG_SYS_TEXT_BASE=0x10000 -+CONFIG_ASPEED_AST2600=y -+# CONFIG_ASPEED_LOADERS is not set -+CONFIG_SPL_LIBCOMMON_SUPPORT=y -+CONFIG_SPL_LIBGENERIC_SUPPORT=y -+CONFIG_SYS_MALLOC_F_LEN=0x2000 -+CONFIG_SPL_MMC_SUPPORT=y -+CONFIG_SPL_SERIAL_SUPPORT=y -+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y -+CONFIG_ENV_SIZE=0x10000 -+CONFIG_ENV_OFFSET=0xE0000 -+CONFIG_SPL=y -+CONFIG_SPL_STACK_R_ADDR=0x93000000 -+CONFIG_ARMV7_BOOT_SEC_DEFAULT=y -+CONFIG_ARMV7_PSCI_NR_CPUS=2 -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_FIT=y -+CONFIG_FIT_ENABLE_SHA384_SUPPORT=y -+CONFIG_FIT_ENABLE_SHA512_SUPPORT=y -+CONFIG_FIT_SIGNATURE=y -+CONFIG_SPL_FIT_SIGNATURE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_IMAGE_FORMAT_LEGACY=y -+CONFIG_USE_BOOTARGS=y -+CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw vmalloc=800M" -+CONFIG_USE_BOOTCOMMAND=y -+CONFIG_BOOTCOMMAND="run bootspi" -+CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_ARCH_EARLY_INIT_R=y -+CONFIG_BOARD_EARLY_INIT_F=y -+CONFIG_SPL_BOARD_INIT=y -+# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set -+CONFIG_SPL_SYS_MALLOC_SIMPLE=y -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_SEPARATE_BSS=y -+CONFIG_SPL_SHA1_SUPPORT=y -+CONFIG_SPL_SHA256_SUPPORT=y -+CONFIG_SPL_SHA384_SUPPORT=y -+CONFIG_SPL_SHA512_SUPPORT=y -+CONFIG_SPL_FIT_IMAGE_TINY=y -+CONFIG_SPL_DM_RESET=y -+CONFIG_SPL_RAM_SUPPORT=y -+CONFIG_SPL_RAM_DEVICE=y -+CONFIG_SPL_WATCHDOG_SUPPORT=y -+CONFIG_SPL_YMODEM_SUPPORT=y -+CONFIG_HUSH_PARSER=y -+# CONFIG_AUTO_COMPLETE is not set -+CONFIG_SYS_PROMPT="ast# " -+CONFIG_CMD_BOOTZ=y -+# CONFIG_CMD_ELF is not set -+# CONFIG_CMD_IMI is not set -+# CONFIG_CMD_XIMG is not set -+CONFIG_CMD_MEMTEST=y -+CONFIG_SYS_ALT_MEMTEST=y -+CONFIG_CMD_CLK=y -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_GPT=y -+# CONFIG_RANDOM_UUID is not set -+CONFIG_CMD_I2C=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_PART=y -+CONFIG_CMD_SF=y -+CONFIG_CMD_DHCP=y -+CONFIG_CMD_MII=y -+CONFIG_CMD_PING=y -+CONFIG_CMD_NCSI=y -+CONFIG_CMD_EXT2=y -+CONFIG_CMD_EXT4=y -+CONFIG_CMD_EXT4_WRITE=y -+CONFIG_CMD_FAT=y -+CONFIG_CMD_FS_GENERIC=y -+CONFIG_CMD_MTDPARTS=y -+# CONFIG_SPL_EFI_PARTITION is not set -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_ENV_IS_IN_SPI_FLASH=y -+CONFIG_USE_ENV_SPI_BUS=y -+CONFIG_ENV_SPI_BUS=0 -+CONFIG_USE_ENV_SPI_CS=y -+CONFIG_ENV_SPI_CS=0 -+CONFIG_USE_ENV_SPI_MAX_HZ=y -+CONFIG_ENV_SPI_MAX_HZ=100000000 -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_SPL_DM=y -+CONFIG_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_OF_TRANSLATE=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_ASPEED_HACE=y -+CONFIG_ASPEED_ACRY=y -+CONFIG_DM_GPIO=y -+CONFIG_ASPEED_GPIO=y -+CONFIG_DM_I2C=y -+CONFIG_SYS_I2C_ASPEED=y -+CONFIG_MISC=y -+CONFIG_ASPEED_AHBC=y -+CONFIG_DM_MMC=y -+CONFIG_SPL_MMC_TINY=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_ASPEED=y -+CONFIG_DM_SPI_FLASH=y -+CONFIG_SPI_FLASH=y -+CONFIG_SPI_FLASH_GIGADEVICE=y -+CONFIG_SPI_FLASH_MACRONIX=y -+CONFIG_SPI_FLASH_SPANSION=y -+CONFIG_SPI_FLASH_STMICRO=y -+CONFIG_SPI_FLASH_WINBOND=y -+CONFIG_PHY_BROADCOM=y -+CONFIG_PHY_REALTEK=y -+CONFIG_PHY_NCSI=y -+CONFIG_DM_ETH=y -+CONFIG_PHY_GIGE=y -+CONFIG_FTGMAC100=y -+CONFIG_MDIO=y -+CONFIG_PHY=y -+CONFIG_PINCTRL=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_DM_SERIAL=y -+CONFIG_SYS_NS16550=y -+CONFIG_SPI=y -+CONFIG_DM_SPI=y -+CONFIG_SYSRESET=y -+CONFIG_WDT=y -+CONFIG_USE_TINY_PRINTF=y -+#CONFIG_TPM=y -+#CONFIG_SPL_TPM=y -+CONFIG_SPL_TINY_MEMSET=y -+# CONFIG_EFI_LOADER is not set -+CONFIG_CMD_NETTEST=y --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0002-lipari-dts-file.patch b/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0002-lipari-dts-file.patch deleted file mode 100644 index e4b01a6f08..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0002-lipari-dts-file.patch +++ /dev/null @@ -1,344 +0,0 @@ -From dacae57f167499e693010a97f7d0387436274b6b Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Thu, 2 Mar 2023 14:46:15 +0000 -Subject: [PATCH] lipari-dts-changes - ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/ast2600-lipari.dts | 312 ++++++++++++++++++++++++++++++++ - 2 files changed, 313 insertions(+) - create mode 100644 arch/arm/dts/ast2600-lipari.dts - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 6dc9aeab24..06df910c95 100755 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -686,6 +686,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \ - ast2600-fpga.dtb \ - ast2600-intel.dtb \ - ast2600-ncsi.dtb \ -+ ast2600-lipari.dtb \ - ast2600-p10bmc.dtb \ - ast2600-pfr.dtb \ - ast2600-qcom-dc-scm-v1.dtb \ -diff --git a/arch/arm/dts/ast2600-lipari.dts b/arch/arm/dts/ast2600-lipari.dts -new file mode 100644 -index 0000000000..37db2a1510 ---- /dev/null -+++ b/arch/arm/dts/ast2600-lipari.dts -@@ -0,0 +1,312 @@ -+/dts-v1/; -+ -+#include "ast2600-u-boot.dtsi" -+ -+/ { -+ model = "AST2600 LIPARI"; -+ compatible = "aspeed,ast2600-evb", "aspeed,ast2600"; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x80000000 0x40000000>; -+ }; -+ -+ chosen { -+ stdout-path = &uart5; -+ }; -+ -+ aliases { -+ mmc0 = &emmc_slot0; -+ mmc1 = &sdhci_slot0; -+ mmc2 = &sdhci_slot1; -+ spi0 = &fmc; -+ spi1 = &spi1; -+ spi2 = &spi2; -+ ethernet0 = &mac0; -+ ethernet1 = &mac1; -+ ethernet2 = &mac2; -+ ethernet3 = &mac3; -+ }; -+ -+ cpus { -+ cpu@0 { -+ clock-frequency = <800000000>; -+ }; -+ cpu@1 { -+ clock-frequency = <800000000>; -+ }; -+ }; -+}; -+ -+&uart5 { -+ u-boot,dm-pre-reloc; -+ status = "okay"; -+}; -+ -+&sdrammc { -+ clock-frequency = <400000000>; -+}; -+ -+&wdt1 { -+ status = "okay"; -+}; -+ -+&wdt2 { -+ status = "okay"; -+}; -+ -+&wdt3 { -+ status = "okay"; -+}; -+ -+&mac2 { -+ status = "okay"; -+ phy-mode = "NC-SI"; -+ use-ncsi; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_rmii3_default>; -+}; -+ -+&fmc { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_fmcquad_default>; -+ -+ flash@0 { -+ status = "okay"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@1 { -+ status = "okay"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@2 { -+ status = "disabled"; -+ }; -+}; -+ -+&spi1 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1abr_default -+ &pinctrl_spi1cs1_default &pinctrl_spi1wp_default -+ &pinctrl_spi1wp_default &pinctrl_spi1quad_default>; -+ -+ flash@0 { -+ status = "disabled"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@1 { -+ status = "disabled"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+}; -+ -+&spi2 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2cs1_default -+ &pinctrl_spi2cs2_default &pinctrl_spi2quad_default>; -+ -+ fpga@0 { -+ status = "okay"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ fpga@1 { -+ status = "disabled"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+}; -+ -+&emmc { -+ u-boot,dm-pre-reloc; -+ timing-phase = <0x000f0097>; -+}; -+ -+&emmc_slot0 { -+ u-boot,dm-pre-reloc; -+ status = "okay"; -+ bus-width = <4>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_emmc_default>; -+ sdhci-drive-type = <1>; -+}; -+ -+&sdhci { -+ timing-phase = <0x00c6375f>; -+}; -+ -+&sdhci_slot0 { -+ status = "okay"; -+ bus-width = <4>; -+ pwr-gpios = <&gpio0 ASPEED_GPIO(V, 0) GPIO_ACTIVE_HIGH>; -+ pwr-sw-gpios = <&gpio0 ASPEED_GPIO(V, 1) GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_sd1_default>; -+ sdhci-drive-type = <1>; -+}; -+ -+&sdhci_slot1 { -+ status = "okay"; -+ bus-width = <4>; -+ pwr-gpios = <&gpio0 ASPEED_GPIO(V, 2) GPIO_ACTIVE_HIGH>; -+ pwr-sw-gpios = <&gpio0 ASPEED_GPIO(V, 3) GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_sd2_default>; -+ sdhci-drive-type = <1>; -+}; -+ -+&i2c2 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c3_default>; -+}; -+ -+&i2c4 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c5_default>; -+}; -+ -+&i2c5 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c6_default>; -+}; -+ -+&i2c6 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c7_default>; -+}; -+ -+&i2c7 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c8_default>; -+}; -+ -+&i2c8 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c9_default>; -+}; -+ -+&i2c9 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c10_default>; -+}; -+ -+&i2c10 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c11_default>; -+}; -+ -+&i2c11 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c12_default>; -+}; -+ -+&i2c12 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c13_default>; -+ -+}; -+ -+&i2c13 { -+ status = "okay"; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c14_default>; -+}; -+ -+&pcie_phy1 { -+ status = "okay"; -+}; -+ -+&pcie_bridge { -+ status = "okay"; -+}; -+ -+#if 0 -+&fsim0 { -+ status = "okay"; -+}; -+ -+&fsim1 { -+ status = "okay"; -+}; -+#endif -+ -+#if 0 -+&vhub { -+ status = "okay"; -+}; -+#endif -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&display_port { -+ status = "okay"; -+}; -+ -+&scu { -+ mac0-clk-delay = <0x10 0x0a -+ 0x10 0x10 -+ 0x10 0x10>; -+ mac1-clk-delay = <0x10 0x0a -+ 0x10 0x10 -+ 0x10 0x10>; -+ mac2-clk-delay = <0x08 0x04 -+ 0x08 0x04 -+ 0x08 0x04>; -+ mac3-clk-delay = <0x08 0x04 -+ 0x08 0x04 -+ 0x08 0x04>; -+}; -+ -+&hace { -+ u-boot,dm-pre-reloc; -+ status = "okay"; -+}; -+ -+&acry { -+ u-boot,dm-pre-reloc; -+ status = "okay"; -+}; --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0003-lpc-mode-config.patch b/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0003-lpc-mode-config.patch deleted file mode 100644 index fb439479d7..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/0003-lpc-mode-config.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 281cffc705f83e1b7b37628894bb05086ac2fad6 Mon Sep 17 00:00:00 2001 -From: mushtaqk -Date: Wed, 11 Jan 2023 10:22:35 +0000 -Subject: [PATCH] lpc-mode-config - ---- - arch/arm/mach-aspeed/ast2600/board_common.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/arch/arm/mach-aspeed/ast2600/board_common.c b/arch/arm/mach-aspeed/ast2600/board_common.c -index 53870dd71d..526a4b6b6b 100644 ---- a/arch/arm/mach-aspeed/ast2600/board_common.c -+++ b/arch/arm/mach-aspeed/ast2600/board_common.c -@@ -90,6 +90,12 @@ __weak int board_init(void) - if (ret) - break; - } -+ -+#define LPC_MODE (1 << 6) -+ u32 hwstrap2; -+ hwstrap2 = readl(ASPEED_HW_STRAP2); -+ hwstrap2 |= LPC_MODE; -+ writel(hwstrap2, ASPEED_HW_STRAP2); - - return 0; - } --- -2.17.1 diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg b/meta-amd/meta-lipari/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg deleted file mode 100644 index 0bf3ff0598..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_ENV_SIZE=0x10000 -CONFIG_ENV_OFFSET=0xE0000 diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend deleted file mode 100644 index 63c3394f74..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -require conf/machine/distro/include/uboot-distrovars.inc - -SRCREV = "a7c723fdd887cf1ac9202de518e9669c7cd09ed6" - -SRC_URI += "file://0001-lipari-spl-defconfig.patch \ - file://0002-lipari-dts-file.patch \ - file://0003-lpc-mode-config.patch \ - " -SRC_URI_append_uboot-flash-65536 += "file://u-boot_flash_64M.cfg \ - " diff --git a/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend b/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend deleted file mode 100644 index edffcd11fc..0000000000 --- a/meta-amd/meta-lipari/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRCREV = "a7c723fdd887cf1ac9202de518e9669c7cd09ed6" - -SRC_URI += "file://0001-lipari-spl-defconfig.patch \ - " diff --git a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/COPYING b/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/COPYING deleted file mode 100644 index 6d45519c8c..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/Makefile b/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/Makefile deleted file mode 100644 index 89564d8cba..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -obj-m := liparigpio.o -liparigpio-y := lipari_gpio.o - -SRC := $(shell pwd) - -all: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) - -modules_install: - $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install - -clean: - rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c - rm -f Module.markers Module.symvers modules.order - rm -rf .tmp_versions Modules.symvers diff --git a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/lipari_gpio.c b/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/lipari_gpio.c deleted file mode 100644 index 2b1508c309..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/files/lipari_gpio.c +++ /dev/null @@ -1,307 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -struct gpio_desc **gpioq = NULL; -uint32_t ngpio_q; -struct gpio_desc **gpiob = NULL; -uint32_t ngpio_b; -struct gpio_desc **gpioy = NULL; -uint32_t ngpio_y; - - -#define BUILD_GET_FUNC(name, gpio_desc) \ -static ssize_t get_##name(struct device *dev, struct device_attribute *attr, char *buf) \ -{ \ - int val = 0; \ - if (gpio_desc == NULL) \ - return -ENOENT; \ - val = gpiod_get_value(gpio_desc); \ - return (sprintf(buf,"GPIO :%s Value: %d\n",#name,val)); \ -} - -#define BUILD_SET_FUNC(name, gpio_desc) \ -static ssize_t set_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \ -{ \ - int val = simple_strtol(buf, NULL, 10); \ - if (gpio_desc == NULL) \ - return -ENOENT; \ - gpiod_set_value(gpio_desc, val); \ - return n; \ -} - -#define GPIO_DEVICE_ATTR_RW(name, num) \ -static DEVICE_ATTR(name##num, S_IWUSR | S_IRUGO, get_##name##num, set_##name##num); - -#define GPIO_DEVICE_ATTR_RO(name, num) \ -static DEVICE_ATTR(name##num, S_IWUSR | S_IRUGO, get_##name##num, NULL); - -BUILD_GET_FUNC(gpioq0, gpioq[0]); -BUILD_GET_FUNC(gpioq1, gpioq[1]); -BUILD_GET_FUNC(gpioq2, gpioq[2]); -//BUILD_GET_FUNC(gpioq3, gpioq[3]); -//BUILD_GET_FUNC(gpioq4, gpioq[4]); -BUILD_GET_FUNC(gpioq5, gpioq[5]); -BUILD_GET_FUNC(gpioq6, gpioq[6]); -BUILD_GET_FUNC(gpioq7, gpioq[7]); - -BUILD_SET_FUNC(gpioq0, gpioq[0]); -BUILD_SET_FUNC(gpioq1, gpioq[1]); -BUILD_SET_FUNC(gpioq2, gpioq[2]); -//BUILD_SET_FUNC(gpioq3, gpioq[3]); -//BUILD_SET_FUNC(gpioq4, gpioq[4]); -//BUILD_SET_FUNC(gpioq5, gpioq[5]); -BUILD_SET_FUNC(gpioq6, gpioq[6]); -BUILD_SET_FUNC(gpioq7, gpioq[7]); - -BUILD_GET_FUNC(gpiob1, gpiob[0]); -BUILD_GET_FUNC(gpiob2, gpiob[1]); -BUILD_GET_FUNC(gpiob3, gpiob[2]); -BUILD_GET_FUNC(gpiob4, gpiob[3]); -BUILD_GET_FUNC(gpiob6, gpiob[4]); - -BUILD_SET_FUNC(gpiob3, gpiob[2]); - -BUILD_GET_FUNC(gpioy0, gpioy[0]); -BUILD_GET_FUNC(gpioy1, gpioy[1]); -BUILD_GET_FUNC(gpioy2, gpioy[2]); -BUILD_GET_FUNC(gpioy3, gpioy[3]); - -BUILD_SET_FUNC(gpioy1, gpioy[1]); -BUILD_SET_FUNC(gpioy2, gpioy[2]); -BUILD_SET_FUNC(gpioy3, gpioy[3]); - -GPIO_DEVICE_ATTR_RW(gpioq, 0); -GPIO_DEVICE_ATTR_RW(gpioq, 1); -GPIO_DEVICE_ATTR_RW(gpioq, 2); -//GPIO_DEVICE_ATTR_RW(gpioq, 3); -//GPIO_DEVICE_ATTR_RW(gpioq, 4); -GPIO_DEVICE_ATTR_RO(gpioq, 5); -GPIO_DEVICE_ATTR_RW(gpioq, 6); -GPIO_DEVICE_ATTR_RW(gpioq, 7); - - -GPIO_DEVICE_ATTR_RO(gpiob, 1); -GPIO_DEVICE_ATTR_RO(gpiob, 2); -GPIO_DEVICE_ATTR_RW(gpiob, 3); -GPIO_DEVICE_ATTR_RO(gpiob, 4); -GPIO_DEVICE_ATTR_RO(gpiob, 6); - -GPIO_DEVICE_ATTR_RO(gpioy, 0); -GPIO_DEVICE_ATTR_RW(gpioy, 1); -GPIO_DEVICE_ATTR_RW(gpioy, 2); -GPIO_DEVICE_ATTR_RW(gpioy, 3); - - -static struct attribute *gpioq_sys_entries[] = { - &dev_attr_gpioq0.attr, - &dev_attr_gpioq1.attr, - &dev_attr_gpioq2.attr, -// &dev_attr_gpioq3.attr, -// &dev_attr_gpioq4.attr, - &dev_attr_gpioq5.attr, - &dev_attr_gpioq6.attr, - &dev_attr_gpioq7.attr, - NULL -}; - -static const struct attribute_group gpioq_attr_group = { - .name = "gpioq", - .attrs = gpioq_sys_entries, -}; - -static struct attribute *gpiob_sys_entries[] = { - &dev_attr_gpiob1.attr, - &dev_attr_gpiob2.attr, - &dev_attr_gpiob3.attr, - &dev_attr_gpiob4.attr, - &dev_attr_gpiob6.attr, - NULL -}; - -static const struct attribute_group gpiob_attr_group = { - .name = "gpiob", - .attrs = gpiob_sys_entries, -}; - -static struct attribute *gpioy_sys_entries[] = { - &dev_attr_gpioy0.attr, - &dev_attr_gpioy1.attr, - &dev_attr_gpioy2.attr, - &dev_attr_gpioy3.attr, - NULL -}; - -static const struct attribute_group gpioy_attr_group = { - .name = "gpioy", - .attrs = gpioy_sys_entries, -}; - - -static int lipari_gpio_probe(struct platform_device *pdev) -{ - int i; - - dev_info(&pdev->dev, "Driver for lipari BMC gpio"); - - /*gpioq 0-7 */ - ngpio_q = gpiod_count(&pdev->dev, "gpioq"); - dev_info(&pdev->dev, "num of gpio line under q:%u\n", ngpio_q); - if (ngpio_q > 0) { - gpioq = devm_kcalloc(&pdev->dev, ngpio_q, - sizeof(struct gpio_desc *), GFP_KERNEL); - if (gpioq != NULL) { - for(i = 0; i < ngpio_q; i++) { - if ((i == 0) || (i == 3)) { - gpioq[i] = devm_gpiod_get_index(&pdev->dev, "gpioq", - i, GPIOD_OUT_LOW); - } else if (i == 5) { - gpioq[i] = devm_gpiod_get_index(&pdev->dev, "gpioq", - i, GPIOD_IN); - } else { - gpioq[i] = devm_gpiod_get_index(&pdev->dev, "gpioq", - i, GPIOD_OUT_HIGH); - } - if (IS_ERR(gpioq[i])) { - dev_err(&pdev->dev, "gpioq get failed at index:%d err:%ld", - i, PTR_ERR(gpioq[i])); - gpioq[i] = NULL; - return 0; - } - } - sysfs_create_group(&(pdev->dev.kobj), &gpioq_attr_group); - } - } - - /*gpiob */ - ngpio_b = gpiod_count(&pdev->dev, "gpiob"); - dev_info(&pdev->dev, "num of gpio line under b:%u\n", ngpio_b); - if (ngpio_b > 0) { - gpiob = devm_kcalloc(&pdev->dev, ngpio_b, - sizeof(struct gpio_desc *), GFP_KERNEL); - if (gpiob != NULL) { - for(i = 0; i < ngpio_b; i++) { - if (i == 3) { - gpiob[i] = devm_gpiod_get_index(&pdev->dev, "gpiob", - i, GPIOD_OUT_HIGH); - } else { - gpiob[i] = devm_gpiod_get_index(&pdev->dev, "gpiob", - i, GPIOD_IN); - } - if (IS_ERR(gpiob[i])) { - dev_err(&pdev->dev, "gpiob get failed at index:%d err:%ld", - i, PTR_ERR(gpiob[i])); - gpiob[i] = NULL; - return 0; - } - } - sysfs_create_group(&(pdev->dev.kobj), &gpiob_attr_group); - } - } - - /*gpioy */ - ngpio_y = gpiod_count(&pdev->dev, "gpioy"); - dev_info(&pdev->dev, "num of gpio line under y:%u\n", ngpio_y); - if (ngpio_y > 0) { - gpioy = devm_kcalloc(&pdev->dev, ngpio_y, - sizeof(struct gpio_desc *), GFP_KERNEL); - if (gpioy != NULL) { - for(i = 0; i < ngpio_y; i++) { - if (i == 0) { - gpioy[i] = devm_gpiod_get_index(&pdev->dev, "gpioy", - i, GPIOD_IN); - } else { - gpioy[i] = devm_gpiod_get_index(&pdev->dev, "gpioy", - i, GPIOD_OUT_LOW); - } - if (IS_ERR(gpioy[i])) { - dev_err(&pdev->dev, "gpioy get failed at index:%d err:%ld", - i, PTR_ERR(gpioy[i])); - gpioy[i] = NULL; - return 0; - } - } - sysfs_create_group(&(pdev->dev.kobj), &gpioy_attr_group); - } - } - dev_info(&pdev->dev, "initialized.\n"); - return 0; -} - -static void free_gpio_resources (struct platform_device *pdev, int num_lines, - struct gpio_desc **gpio, - struct attribute_group *sysfs_attr_group) -{ - int i = 0; - if (gpio) { - for (i = 0; i < num_lines; i++) { - if (gpio[i]) { - devm_gpiod_put(&pdev->dev, gpio[i]); - } - } - sysfs_remove_group(&(pdev->dev.kobj), sysfs_attr_group); - devm_kfree(&(pdev->dev), gpio); - } -} - -static int lipari_gpio_remove(struct platform_device *pdev) -{ - int i = 0; - - dev_info(&pdev->dev, "exiting.\n"); - /* release gpios and sysfs entries */ - if (gpioq) { - for (i = 0; i < ngpio_q; i++) { - if (gpioq[i]) { - devm_gpiod_put(&pdev->dev, gpioq[i]); - } - } - sysfs_remove_group(&(pdev->dev.kobj), &gpioq_attr_group); - devm_kfree(&(pdev->dev), gpioq); - } - if (gpiob) { - for (i = 0; i < ngpio_b; i++) { - if (gpiob[i]) { - devm_gpiod_put(&pdev->dev, gpiob[i]); - } - } - sysfs_remove_group(&(pdev->dev.kobj), &gpiob_attr_group); - devm_kfree(&(pdev->dev), gpiob); - } - if (gpioy) { - for (i = 0; i < ngpio_y; i++) { - if (gpioy[i]) { - devm_gpiod_put(&pdev->dev, gpioy[i]); - } - } - sysfs_remove_group(&(pdev->dev.kobj), &gpioy_attr_group); - devm_kfree(&(pdev->dev), gpioy); - } - return 0; -} - -static const struct of_device_id of_lipari_gpio_match[] = { - { .compatible = "lipari_gpios" }, - {}, -}; - -static struct platform_driver lipari_gpio_driver = { - .driver = { - .name = "lipari_gpios", - .owner = THIS_MODULE, - .of_match_table = of_lipari_gpio_match, - }, - .probe = lipari_gpio_probe, - .remove = lipari_gpio_remove, -}; - -module_platform_driver(lipari_gpio_driver); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Mushtaq Khan "); -MODULE_VERSION("1.0"); diff --git a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/kernel-module-liparigpio.bb b/meta-amd/meta-lipari/recipes-kernel/gpio-mod/kernel-module-liparigpio.bb deleted file mode 100644 index 03da96786e..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/gpio-mod/kernel-module-liparigpio.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Lipari BMC GPIO Sysfs driver Linux kernel module" -DESCRIPTION = "${SUMMARY}" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" - -#DEPENDS = "virtual/kernel" - -inherit module - -SRC_URI = "file://Makefile \ - file://lipari_gpio.c \ - file://COPYING \ - " - -S = "${WORKDIR}" - -# The inherit of module.bbclass will automatically name module packages with -# "kernel-module-" prefix as required by the oe-core build environment. - -RPROVIDES_${PN} += "kernel-module-liparigpio" diff --git a/meta-amd/meta-lipari/recipes-kernel/kern-tools/kern-tools-native_git.bbappend b/meta-amd/meta-lipari/recipes-kernel/kern-tools/kern-tools-native_git.bbappend deleted file mode 100644 index dff800a1d8..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/kern-tools/kern-tools-native_git.bbappend +++ /dev/null @@ -1,5 +0,0 @@ - -SRCREV = "90598a5fae1172e3f7782a1b02f7b7518efd32c8" -PV = "0.3+git${SRCPV}" - -SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git;branch=master" diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0001-ARM-dts-aspeed-g6-Add-PCC-support.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0001-ARM-dts-aspeed-g6-Add-PCC-support.patch deleted file mode 100644 index 52fd933b08..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0001-ARM-dts-aspeed-g6-Add-PCC-support.patch +++ /dev/null @@ -1,34 +0,0 @@ -From eb72dad9d0049c5528d3d3c85510e9f0ef98658c Mon Sep 17 00:00:00 2001 -From: Chia-Wei Wang -Date: Fri, 5 Nov 2021 11:28:46 +0800 -Subject: [PATCH 01/11] ARM: dts: aspeed-g6: Add PCC support - -Add the device tree node for Aspeed PCC controller. - -Signed-off-by: Chia-Wei Wang -Change-Id: I5e0b1b5dde9a69a9da9e10e4eb251d56250ca018 ---- - arch/arm/boot/dts/aspeed-g6.dtsi | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi -index 8c0de3f27883..3765d2567f1a 100644 ---- a/arch/arm/boot/dts/aspeed-g6.dtsi -+++ b/arch/arm/boot/dts/aspeed-g6.dtsi -@@ -609,6 +609,13 @@ - status = "disabled"; - }; - -+ lpc_pcc: lpc-pcc@0 { -+ compatible = "aspeed,ast2600-lpc-pcc"; -+ reg = <0x0 0x140>; -+ interrupts = ; -+ status = "disabled"; -+ }; -+ - lhc: lhc@a0 { - compatible = "aspeed,ast2600-lhc"; - reg = <0xa0 0x24 0xc8 0x8>; --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-Add-Post-Code-Control.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-Add-Post-Code-Control.patch deleted file mode 100644 index 9f0cbc1c71..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0002-soc-aspeed-Add-Post-Code-Control.patch +++ /dev/null @@ -1,692 +0,0 @@ -From 0cdeb43b0cd2bda0138598c369764c60872e1343 Mon Sep 17 00:00:00 2001 -From: Chia-Wei Wang -Date: Fri, 5 Nov 2021 11:28:23 +0800 -Subject: [PATCH 02/11] soc: aspeed: Add Post Code Control - -Add Aspeed Post Code Capture (PCC) module support. -PCC can be used to snoop the debug code sent by the -host through LPC I/O ports. - -Signed-off-by: Chia-Wei Wang -Change-Id: I54b98cc301ced5254646466c1efbccafcd86b056 ---- - drivers/soc/aspeed/Kconfig | 8 + - drivers/soc/aspeed/Makefile | 1 + - drivers/soc/aspeed/aspeed-lpc-pcc.c | 637 ++++++++++++++++++++++++++++ - 3 files changed, 646 insertions(+) - create mode 100644 drivers/soc/aspeed/aspeed-lpc-pcc.c - -diff --git a/drivers/soc/aspeed/Kconfig b/drivers/soc/aspeed/Kconfig -index aaf4596ae4f9..a06baf2bb6eb 100644 ---- a/drivers/soc/aspeed/Kconfig -+++ b/drivers/soc/aspeed/Kconfig -@@ -69,6 +69,14 @@ config ASPEED_SBC - Say yes to provide information about the secure boot controller in - debugfs. - -+config ASPEED_LPC_PCC -+ tristate "Aspeed Post Code Capture support" -+ depends on ARCH_ASPEED && REGMAP && MFD_SYSCON -+ help -+ Provides a driver to control the LPC PCC interface, -+ allowing the BMC to snoop data bytes written by the -+ the host to an arbitrary LPC I/O port. -+ - endmenu - - endif -diff --git a/drivers/soc/aspeed/Makefile b/drivers/soc/aspeed/Makefile -index 9e275fd1d54d..84963096b2c7 100644 ---- a/drivers/soc/aspeed/Makefile -+++ b/drivers/soc/aspeed/Makefile -@@ -6,3 +6,4 @@ obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o - obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o - obj-$(CONFIG_ASPEED_SBC) += aspeed-sbc.o - obj-$(CONFIG_ASPEED_XDMA) += aspeed-xdma.o -+obj-$(CONFIG_ASPEED_LPC_PCC) += aspeed-lpc-pcc.o -diff --git a/drivers/soc/aspeed/aspeed-lpc-pcc.c b/drivers/soc/aspeed/aspeed-lpc-pcc.c -new file mode 100644 -index 000000000000..141d6fa5d553 ---- /dev/null -+++ b/drivers/soc/aspeed/aspeed-lpc-pcc.c -@@ -0,0 +1,637 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) ASPEED Technology Inc. -+ */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DEVICE_NAME "aspeed-lpc-pcc" -+ -+#define LHCR5 0x0b4 -+#define LHCR6 0x0b8 -+#define PCCR6 0x0c4 -+#define LHCRA 0x0c8 -+#define LHCRA_PAT_A_LEN_MASK GENMASK(18, 17) -+#define LHCRA_PAT_A_LEN_SHIFT 17 -+#define LHCRA_PAT_A_WRITE BIT(16) -+#define LHCRA_PAT_A_ADDR_MASK GENMASK(15, 0) -+#define LHCRA_PAT_A_ADDR_SHIFT 0 -+#define LHCRB 0x0cc -+#define LHCRB_PAT_B_LEN_MASK GENMASK(18, 17) -+#define LHCRB_PAT_B_LEN_SHIFT 17 -+#define LHCRB_PAT_B_WRITE BIT(16) -+#define LHCRB_PAT_B_ADDR_MASK GENMASK(15, 0) -+#define LHCRB_PAT_B_ADDR_SHIFT 0 -+#define PCCR4 0x0d0 -+#define PCCR5 0x0d4 -+#define PCCR0 0x130 -+#define PCCR0_EN_DMA_INT BIT(31) -+#define PCCR0_EN_PAT_B_INT BIT(23) -+#define PCCR0_EN_PAT_B BIT(22) -+#define PCCR0_EN_PAT_A_INT BIT(21) -+#define PCCR0_EN_PAT_A BIT(20) -+#define PCCR0_EN_DMA_MODE BIT(14) -+#define PCCR0_ADDR_SEL_MASK GENMASK(13, 12) -+#define PCCR0_ADDR_SEL_SHIFT 12 -+#define PCCR0_RX_TRIG_LVL_MASK GENMASK(10, 8) -+#define PCCR0_RX_TRIG_LVL_SHIFT 8 -+#define PCCR0_CLR_RX_FIFO BIT(7) -+#define PCCR0_MODE_SEL_MASK GENMASK(5, 4) -+#define PCCR0_MODE_SEL_SHIFT 4 -+#define PCCR0_EN_RX_OVR_INT BIT(3) -+#define PCCR0_EN_RX_TMOUT_INT BIT(2) -+#define PCCR0_EN_RX_AVAIL_INT BIT(1) -+#define PCCR0_EN BIT(0) -+#define PCCR1 0x134 -+#define PCCR1_BASE_ADDR_MASK GENMASK(15, 0) -+#define PCCR1_BASE_ADDR_SHIFT 0 -+#define PCCR1_DONT_CARE_BITS_MASK GENMASK(21, 16) -+#define PCCR1_DONT_CARE_BITS_SHIFT 16 -+#define PCCR2 0x138 -+#define PCCR2_PAT_B_RST BIT(17) -+#define PCCR2_PAT_B_INT BIT(16) -+#define PCCR2_PAT_A_RST BIT(9) -+#define PCCR2_PAT_A_INT BIT(8) -+#define PCCR2_DMA_DONE BIT(4) -+#define PCCR2_DATA_RDY PCCR2_DMA_DONE -+#define PCCR2_RX_OVR_INT BIT(3) -+#define PCCR2_RX_TMOUT_INT BIT(2) -+#define PCCR2_RX_AVAIL_INT BIT(1) -+#define PCCR3 0x13c -+#define PCCR3_DATA_RDY BIT(23) -+#define PCCR3_FIFO_DATA_MASK GENMASK(7, 0) -+ -+#define PCC_DMA_MAX_BUFSZ (PAGE_SIZE) -+#define PCC_MAX_PATNM 2 -+ -+enum pcc_fifo_threshold { -+ PCC_FIFO_THR_1_BYTE, -+ PCC_FIFO_THR_1_EIGHTH, -+ PCC_FIFO_THR_2_EIGHTH, -+ PCC_FIFO_THR_3_EIGHTH, -+ PCC_FIFO_THR_4_EIGHTH, -+ PCC_FIFO_THR_5_EIGHTH, -+ PCC_FIFO_THR_6_EIGHTH, -+ PCC_FIFO_THR_7_EIGHTH, -+ PCC_FIFO_THR_8_EIGHTH, -+}; -+ -+enum pcc_record_mode { -+ PCC_REC_1B, -+ PCC_REC_2B, -+ PCC_REC_4B, -+ PCC_REC_FULL, -+}; -+ -+enum pcc_port_hbits_select { -+ PCC_PORT_HBITS_SEL_NONE, -+ PCC_PORT_HBITS_SEL_45, -+ PCC_PORT_HBITS_SEL_67, -+ PCC_PORT_HBITS_SEL_89, -+}; -+ -+struct pcc_pattern { -+ u32 enable; -+ u32 pattern; -+ u32 len; -+ u32 write; -+ u32 port; -+}; -+ -+struct aspeed_pcc_dma { -+ u32 idx; -+ u32 addr; -+ u8 *virt; -+ u32 size; -+ u32 static_mem; -+ struct tasklet_struct tasklet; -+}; -+ -+struct aspeed_pcc { -+ struct device *dev; -+ struct regmap *regmap; -+ int irq; -+ -+ u32 rec_mode; -+ -+ u32 port; -+ u32 port_xbits; -+ u32 port_hbits_select; -+ -+ u32 dma_mode; -+ struct aspeed_pcc_dma dma; -+ -+ struct pcc_pattern pat_search[PCC_MAX_PATNM]; -+ -+ struct kfifo fifo; -+ wait_queue_head_t wq; -+ -+ struct miscdevice misc_dev; -+}; -+ -+static inline bool is_pcc_enabled(struct aspeed_pcc *pcc) -+{ -+ u32 reg; -+ if (regmap_read(pcc->regmap, PCCR0, ®)) -+ return false; -+ return (reg & PCCR0_EN) ? true : false; -+} -+ -+static inline bool is_valid_rec_mode(u32 mode) -+{ -+ return (mode > PCC_REC_FULL) ? false : true; -+} -+ -+static inline bool is_valid_high_bits_select(u32 select) -+{ -+ return (select > PCC_PORT_HBITS_SEL_89) ? false : true; -+} -+ -+static ssize_t aspeed_pcc_file_read(struct file *file, char __user *buffer, -+ size_t count, loff_t *ppos) -+{ -+ int rc; -+ ssize_t copied; -+ -+ struct aspeed_pcc *pcc = container_of( -+ file->private_data, -+ struct aspeed_pcc, -+ misc_dev); -+ -+ if (kfifo_is_empty(&pcc->fifo)) { -+ if (file->f_flags & O_NONBLOCK) -+ return -EAGAIN; -+ rc = wait_event_interruptible(pcc->wq, -+ !kfifo_is_empty(&pcc->fifo)); -+ if (rc == -ERESTARTSYS) -+ return -EINTR; -+ } -+ -+ rc = kfifo_to_user(&pcc->fifo, buffer, count, &copied); -+ return rc ? rc : copied; -+} -+ -+static __poll_t aspeed_pcc_file_poll(struct file *file, -+ struct poll_table_struct *pt) -+{ -+ struct aspeed_pcc *pcc = container_of( -+ file->private_data, -+ struct aspeed_pcc, -+ misc_dev); -+ -+ poll_wait(file, &pcc->wq, pt); -+ return !kfifo_is_empty(&pcc->fifo) ? POLLIN : 0; -+} -+ -+static const struct file_operations pcc_fops = { -+ .owner = THIS_MODULE, -+ .read = aspeed_pcc_file_read, -+ .poll = aspeed_pcc_file_poll, -+}; -+ -+static void aspeed_pcc_dma_tasklet(unsigned long arg) -+{ -+ u32 reg; -+ u32 pre_dma_idx; -+ u32 cur_dma_idx; -+ u8 has_data = 0; -+ -+ struct aspeed_pcc *pcc = (struct aspeed_pcc*)arg; -+ struct kfifo *fifo = &pcc->fifo; -+ -+ if (!kfifo_initialized(fifo)) -+ return; -+ -+ if (regmap_read(pcc->regmap, PCCR6, ®)) -+ return; -+ -+ cur_dma_idx = reg & (PCC_DMA_MAX_BUFSZ - 1); -+ pre_dma_idx = pcc->dma.idx; -+ has_data = (pre_dma_idx == cur_dma_idx) ? false : true; -+ -+ do { -+ /* kick the oldest one if full */ -+ if (kfifo_is_full(fifo)) -+ kfifo_skip(fifo); -+ kfifo_put(fifo, pcc->dma.virt[pre_dma_idx]); -+ pre_dma_idx = (pre_dma_idx + 1) % PCC_DMA_MAX_BUFSZ; -+ } while (pre_dma_idx != cur_dma_idx); -+ -+ if (has_data) -+ wake_up_interruptible(&pcc->wq); -+ -+ pcc->dma.idx = cur_dma_idx; -+} -+ -+static irqreturn_t aspeed_pcc_isr(int irq, void *arg) -+{ -+ u32 val; -+ irqreturn_t ret = IRQ_NONE; -+ struct aspeed_pcc *pcc = (struct aspeed_pcc*)arg; -+ -+ if (regmap_read(pcc->regmap, PCCR2, &val)) -+ return ret; -+ -+ if (val & PCCR2_PAT_B_INT) { -+ dev_info(pcc->dev, "pattern search B interrupt\n"); -+ regmap_write_bits(pcc->regmap, PCCR2, -+ PCCR2_PAT_B_INT, PCCR2_PAT_B_INT); -+ ret = IRQ_HANDLED; -+ } -+ -+ if (val & PCCR2_PAT_A_INT) { -+ dev_info(pcc->dev, "pattern search A interrupt\n"); -+ regmap_write_bits(pcc->regmap, PCCR2, -+ PCCR2_PAT_A_INT, PCCR2_PAT_A_INT); -+ ret = IRQ_HANDLED; -+ } -+ -+ if (val & PCCR2_RX_OVR_INT) { -+ dev_warn(pcc->dev, "RX FIFO overrun\n"); -+ regmap_write_bits(pcc->regmap, PCCR2, -+ PCCR2_RX_OVR_INT, PCCR2_RX_OVR_INT); -+ ret = IRQ_HANDLED; -+ } -+ -+ if (val & (PCCR2_DMA_DONE | PCCR2_RX_TMOUT_INT | PCCR2_RX_AVAIL_INT)) { -+ if (pcc->dma_mode) { -+ regmap_write_bits(pcc->regmap, PCCR2, -+ PCCR2_DMA_DONE, PCCR2_DMA_DONE); -+ tasklet_schedule(&pcc->dma.tasklet); -+ } -+ else { -+ do { -+ if (regmap_read(pcc->regmap, PCCR3, &val)) -+ break; -+ if (kfifo_is_full(&pcc->fifo)) -+ kfifo_skip(&pcc->fifo); -+ kfifo_put(&pcc->fifo, val & PCCR3_FIFO_DATA_MASK); -+ -+ if (regmap_read(pcc->regmap, PCCR2, &val)) -+ break; -+ } while (val & PCCR2_DATA_RDY); -+ -+ wake_up_interruptible(&pcc->wq); -+ } -+ ret = IRQ_HANDLED; -+ } -+ -+ return ret; -+} -+ -+static void aspeed_pcc_config(struct aspeed_pcc *pcc) -+{ -+ struct pcc_pattern* pat_search = pcc->pat_search; -+ -+ /* record mode */ -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_MODE_SEL_MASK, -+ pcc->rec_mode << PCCR0_MODE_SEL_SHIFT); -+ -+ /* port address */ -+ regmap_update_bits(pcc->regmap, PCCR1, -+ PCCR1_BASE_ADDR_MASK, -+ pcc->port << PCCR1_BASE_ADDR_SHIFT); -+ -+ /* port address high bits selection or parser control */ -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_ADDR_SEL_MASK, -+ pcc->port_hbits_select << PCCR0_ADDR_SEL_SHIFT); -+ -+ /* port address dont care bits */ -+ regmap_update_bits(pcc->regmap, PCCR1, -+ PCCR1_DONT_CARE_BITS_MASK, -+ pcc->port_xbits << PCCR1_DONT_CARE_BITS_SHIFT); -+ -+ /* pattern search state reset */ -+ regmap_write_bits(pcc->regmap, PCCR2, -+ PCCR2_PAT_B_RST | PCCR2_PAT_A_RST, -+ PCCR2_PAT_B_RST | PCCR2_PAT_A_RST); -+ -+ /* pattern A to search */ -+ regmap_write(pcc->regmap, LHCR5, pat_search[0].pattern); -+ regmap_update_bits(pcc->regmap, LHCRA, -+ LHCRA_PAT_A_LEN_MASK, -+ (pat_search[0].len - 1) << LHCRA_PAT_A_LEN_SHIFT); -+ regmap_update_bits(pcc->regmap, LHCRA, -+ LHCRA_PAT_A_WRITE, -+ (pat_search[0].write) ? LHCRA_PAT_A_WRITE : 0); -+ regmap_update_bits(pcc->regmap, LHCRA, -+ LHCRA_PAT_A_ADDR_MASK, -+ pat_search[0].port << LHCRA_PAT_A_ADDR_SHIFT); -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_PAT_A_INT | PCCR0_EN_PAT_A, -+ (pat_search[0].enable) ? PCCR0_EN_PAT_A_INT | PCCR0_EN_PAT_A : 0); -+ -+ /* pattern B to search */ -+ regmap_write(pcc->regmap, LHCR6, pat_search[1].pattern); -+ regmap_update_bits(pcc->regmap, LHCRB, -+ LHCRB_PAT_B_LEN_MASK, -+ (pat_search[1].len - 1) << LHCRB_PAT_B_LEN_SHIFT); -+ regmap_update_bits(pcc->regmap, LHCRB, -+ LHCRB_PAT_B_WRITE, -+ (pat_search[1].write) ? LHCRB_PAT_B_WRITE : 0); -+ regmap_update_bits(pcc->regmap, LHCRB, -+ LHCRB_PAT_B_ADDR_MASK, -+ pat_search[1].port << LHCRB_PAT_B_ADDR_SHIFT); -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_PAT_B_INT | PCCR0_EN_PAT_B, -+ PCCR0_EN_PAT_B_INT | PCCR0_EN_PAT_B); -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_PAT_B_INT | PCCR0_EN_PAT_B, -+ (pat_search[1].enable) ? PCCR0_EN_PAT_B_INT | PCCR0_EN_PAT_B : 0); -+ -+ /* DMA address and size (4-bytes unit) */ -+ if (pcc->dma_mode) { -+ regmap_write(pcc->regmap, PCCR4, pcc->dma.addr); -+ regmap_write(pcc->regmap, PCCR5, pcc->dma.size / 4); -+ } -+} -+ -+static int aspeed_pcc_enable(struct aspeed_pcc *pcc, struct device *dev) -+{ -+ int rc; -+ -+ if (pcc->dma_mode) { -+ /* map reserved memory or allocate a new one for DMA use */ -+ if (pcc->dma.static_mem) { -+ if (pcc->dma.size > PCC_DMA_MAX_BUFSZ) { -+ rc = -EINVAL; -+ goto err_ret; -+ } -+ -+ pcc->dma.virt = ioremap(pcc->dma.addr, -+ pcc->dma.size); -+ if (pcc->dma.virt == NULL) { -+ rc = -ENOMEM; -+ goto err_ret; -+ } -+ } -+ else { -+ pcc->dma.size = PCC_DMA_MAX_BUFSZ; -+ pcc->dma.virt = dma_alloc_coherent(dev, -+ pcc->dma.size, -+ &pcc->dma.addr, -+ GFP_KERNEL); -+ if (pcc->dma.virt == NULL) { -+ rc = -ENOMEM; -+ goto err_ret; -+ } -+ } -+ } -+ -+ rc = kfifo_alloc(&pcc->fifo, PAGE_SIZE, GFP_KERNEL); -+ if (rc) -+ goto err_free_dma; -+ -+ pcc->misc_dev.parent = dev; -+ pcc->misc_dev.name = devm_kasprintf(dev, GFP_KERNEL, "%s", DEVICE_NAME); -+ pcc->misc_dev.fops = &pcc_fops; -+ rc = misc_register(&pcc->misc_dev); -+ if (rc) -+ goto err_free_kfifo; -+ -+ aspeed_pcc_config(pcc); -+ -+ /* skip FIFO cleanup if already enabled */ -+ if (!is_pcc_enabled(pcc)) -+ regmap_write_bits(pcc->regmap, PCCR0, -+ PCCR0_CLR_RX_FIFO, PCCR0_CLR_RX_FIFO); -+ -+ if (pcc->dma_mode) { -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_DMA_INT | PCCR0_EN_DMA_MODE, -+ PCCR0_EN_DMA_INT | PCCR0_EN_DMA_MODE); -+ } -+ else { -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_RX_TRIG_LVL_MASK, -+ PCC_FIFO_THR_4_EIGHTH << PCCR0_RX_TRIG_LVL_SHIFT); -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_RX_OVR_INT | PCCR0_EN_RX_TMOUT_INT | PCCR0_EN_RX_AVAIL_INT, -+ PCCR0_EN_RX_OVR_INT | PCCR0_EN_RX_TMOUT_INT | PCCR0_EN_RX_AVAIL_INT); -+ } -+ -+ regmap_update_bits(pcc->regmap, PCCR0, PCCR0_EN, PCCR0_EN); -+ return 0; -+ -+err_free_kfifo: -+ kfifo_free(&pcc->fifo); -+err_free_dma: -+ if (pcc->dma_mode) { -+ if (pcc->dma.static_mem) -+ iounmap(pcc->dma.virt); -+ else -+ dma_free_coherent(dev, pcc->dma.size, -+ pcc->dma.virt, pcc->dma.addr); -+ } -+err_ret: -+ return rc; -+} -+ -+static int aspeed_pcc_disable(struct aspeed_pcc *pcc, struct device *dev) -+{ -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_DMA_INT -+ | PCCR0_EN_RX_OVR_INT -+ | PCCR0_EN_RX_TMOUT_INT -+ | PCCR0_EN_RX_AVAIL_INT -+ | PCCR0_EN_DMA_MODE -+ | PCCR0_EN, -+ 0); -+ -+ if (pcc->dma.static_mem) -+ iounmap(pcc->dma.virt); -+ else -+ dma_free_coherent(dev, pcc->dma.size, -+ pcc->dma.virt, pcc->dma.addr); -+ -+ misc_deregister(&pcc->misc_dev); -+ kfifo_free(&pcc->fifo); -+ -+ return 0; -+} -+ -+static int aspeed_pcc_probe(struct platform_device *pdev) -+{ -+ int rc; -+ -+ struct aspeed_pcc *pcc; -+ -+ struct device *dev = &pdev->dev; -+ struct device_node *node; -+ -+ struct resource res; -+ -+ pcc = devm_kzalloc(&pdev->dev, sizeof(*pcc), GFP_KERNEL); -+ if (!pcc) { -+ dev_err(dev, "failed to allocate memory\n"); -+ return -ENOMEM; -+ } -+ -+ pcc->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node); -+ if (IS_ERR(pcc->regmap)) { -+ dev_err(dev, "failed to get regmap\n"); -+ return -ENODEV; -+ } -+ -+ rc = of_property_read_u32(dev->of_node, "port-addr", &pcc->port); -+ if (rc) { -+ dev_err(dev, "failed to get port base address\n"); -+ return rc; -+ } -+ -+ pcc->dma_mode = of_property_read_bool(dev->of_node, "dma-mode"); -+ if (pcc->dma_mode) { -+ /* -+ * optional, reserved memory for the DMA buffer -+ * if not specified, the DMA buffer is allocated -+ * dynamically. -+ */ -+ node = of_parse_phandle(dev->of_node, "memory-region", 0); -+ if (node) { -+ rc = of_address_to_resource(node, 0, &res); -+ if (rc) { -+ dev_err(dev, "failed to get reserved memory region\n"); -+ return -ENOMEM; -+ } -+ pcc->dma.addr = res.start; -+ pcc->dma.size = resource_size(&res); -+ pcc->dma.static_mem = 1; -+ of_node_put(node); -+ } -+ } -+ -+ /* optional, by default: 0 -> 1-Byte mode */ -+ of_property_read_u32(dev->of_node, "rec-mode", &pcc->rec_mode); -+ if (!is_valid_rec_mode(pcc->rec_mode)) { -+ dev_err(dev, "invalid record mode: %u\n", -+ pcc->rec_mode); -+ return -EINVAL; -+ } -+ -+ /* optional, by default: 0 -> no don't care bits */ -+ of_property_read_u32(dev->of_node, "port-addr-xbits", &pcc->port_xbits); -+ -+ /* -+ * optional, by default: 0 -> no high address bits -+ * -+ * Note that when record mode is set to 1-Byte, this -+ * property is ignored and the corresponding HW bits -+ * behave as read/write cycle parser control with the -+ * value set to 0b11 -+ */ -+ if (pcc->rec_mode) { -+ of_property_read_u32(dev->of_node, "port-addr-hbits-select", &pcc->port_hbits_select); -+ if (!is_valid_high_bits_select(pcc->port_hbits_select)) { -+ dev_err(dev, "invalid high address bits selection: %u\n", -+ pcc->port_hbits_select); -+ return -EINVAL; -+ } -+ } -+ else -+ pcc->port_hbits_select = 0x3; -+ -+ /* optional, pattern search A */ -+ if (of_property_read_bool(dev->of_node, "pattern-a-en")) { -+ of_property_read_u32(dev->of_node, "pattern-a", &pcc->pat_search[0].pattern); -+ of_property_read_u32(dev->of_node, "pattern-a-len", &pcc->pat_search[0].len); -+ of_property_read_u32(dev->of_node, "pattern-a-write", &pcc->pat_search[0].write); -+ of_property_read_u32(dev->of_node, "pattern-a-port", &pcc->pat_search[0].port); -+ pcc->pat_search[0].enable = 1; -+ } -+ -+ /* optional, pattern search B */ -+ if (of_property_read_bool(dev->of_node, "pattern-b-en")) { -+ of_property_read_u32(dev->of_node, "pattern-b", &pcc->pat_search[1].pattern); -+ of_property_read_u32(dev->of_node, "pattern-b-len", &pcc->pat_search[1].len); -+ of_property_read_u32(dev->of_node, "pattern-b-write", &pcc->pat_search[1].write); -+ of_property_read_u32(dev->of_node, "pattern-b-port", &pcc->pat_search[1].port); -+ pcc->pat_search[1].enable = 1; -+ } -+ -+ pcc->irq = platform_get_irq(pdev, 0); -+ if (!pcc->irq) { -+ dev_err(dev, "failed to get IRQ\n"); -+ return -ENODEV; -+ } -+ -+ /* -+ * as PCC may have been enabled in early stages, we -+ * need to disable interrupts before requesting IRQ -+ * to prevent kernel crash -+ */ -+ regmap_update_bits(pcc->regmap, PCCR0, -+ PCCR0_EN_DMA_INT -+ | PCCR0_EN_PAT_A_INT -+ | PCCR0_EN_PAT_B_INT -+ | PCCR0_EN_RX_OVR_INT -+ | PCCR0_EN_RX_TMOUT_INT -+ | PCCR0_EN_RX_AVAIL_INT, -+ 0); -+ -+ rc = devm_request_irq(dev, pcc->irq, aspeed_pcc_isr, -+ IRQF_SHARED, DEVICE_NAME, pcc); -+ if (rc < 0) { -+ dev_err(dev, "failed to request IRQ handler\n"); -+ return rc; -+ } -+ -+ tasklet_init(&pcc->dma.tasklet, aspeed_pcc_dma_tasklet, -+ (unsigned long)pcc); -+ -+ init_waitqueue_head(&pcc->wq); -+ -+ rc = aspeed_pcc_enable(pcc, dev); -+ if (rc) { -+ dev_err(dev, "failed to enable PCC\n"); -+ return rc; -+ } -+ -+ pcc->dev = dev; -+ dev_set_drvdata(&pdev->dev, pcc); -+ -+ dev_info(dev, "module loaded\n"); -+ -+ return 0; -+} -+ -+static int aspeed_pcc_remove(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ struct aspeed_pcc *pcc = dev_get_drvdata(dev); -+ aspeed_pcc_disable(pcc, dev); -+ return 0; -+} -+ -+static const struct of_device_id aspeed_pcc_table[] = { -+ { .compatible = "aspeed,ast2500-lpc-pcc" }, -+ { .compatible = "aspeed,ast2600-lpc-pcc" }, -+}; -+ -+static struct platform_driver aspeed_pcc_driver = { -+ .driver = { -+ .name = "aspeed-pcc", -+ .of_match_table = aspeed_pcc_table, -+ }, -+ .probe = aspeed_pcc_probe, -+ .remove = aspeed_pcc_remove, -+}; -+ -+module_platform_driver(aspeed_pcc_driver); -+ -+MODULE_AUTHOR("Chia-Wei Wang "); -+MODULE_LICENSE("GPL"); -+MODULE_DESCRIPTION("Driver for Aspeed Post Code Capture"); --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0003-ipmi-kcs-aspeed-g6-Use-v1-binding.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0003-ipmi-kcs-aspeed-g6-Use-v1-binding.patch deleted file mode 100644 index bc8e7ae853..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0003-ipmi-kcs-aspeed-g6-Use-v1-binding.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b117b628a06ab740e3e813943d8ef5347cb9e1db Mon Sep 17 00:00:00 2001 -From: Chia-Wei Wang -Date: Tue, 7 Dec 2021 10:45:51 +0800 -Subject: [PATCH 03/11] ipmi: kcs: aspeed-g6: Use v1 binding - -Make KCS driver adopt v1 binding as the v2 one -canno be applied on KCS over PCIe. - -Signed-off-by: Chia-Wei Wang -Change-Id: I37ff94c1611a520e84467b0d9cf7615432b5cdb1 ---- - arch/arm/boot/dts/aspeed-g6.dtsi | 16 ++++++++-------- - drivers/char/ipmi/kcs_bmc_aspeed.c | 3 ++- - 2 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi -index 3765d2567f1a..00ac85dbd2b0 100644 ---- a/arch/arm/boot/dts/aspeed-g6.dtsi -+++ b/arch/arm/boot/dts/aspeed-g6.dtsi -@@ -562,8 +562,8 @@ - ranges = <0x0 0x1e789000 0x1000>; - - kcs1: kcs@24 { -- compatible = "aspeed,ast2500-kcs-bmc-v2"; -- reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; -+ compatible = "aspeed,ast2600-kcs-bmc"; -+ reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; - kcs_chan = <1>; -@@ -571,24 +571,24 @@ - }; - - kcs2: kcs@28 { -- compatible = "aspeed,ast2500-kcs-bmc-v2"; -- reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>; -+ compatible = "aspeed,ast2600-kcs-bmc"; -+ reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; - status = "disabled"; - }; - - kcs3: kcs@2c { -- compatible = "aspeed,ast2500-kcs-bmc-v2"; -- reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>; -+ compatible = "aspeed,ast2600-kcs-bmc"; -+ reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; - status = "disabled"; - }; - - kcs4: kcs@114 { -- compatible = "aspeed,ast2500-kcs-bmc-v2"; -- reg = <0x114 0x1>, <0x118 0x1>, <0x11c 0x1>; -+ compatible = "aspeed,ast2600-kcs-bmc"; -+ reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; - status = "disabled"; -diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c -index b555286016b1..a0c802dc7ff2 100644 ---- a/drivers/char/ipmi/kcs_bmc_aspeed.c -+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c -@@ -691,9 +691,10 @@ static const struct aspeed_kcs_of_ops of_v2_ops = { - static const struct of_device_id ast_kcs_bmc_match[] = { - { .compatible = "aspeed,ast2400-kcs-bmc", .data = &of_v1_ops }, - { .compatible = "aspeed,ast2500-kcs-bmc", .data = &of_v1_ops }, -+ { .compatible = "aspeed,ast2600-kcs-bmc", .data = &of_v1_ops }, - { .compatible = "aspeed,ast2400-kcs-bmc-v2", .data = &of_v2_ops }, - { .compatible = "aspeed,ast2500-kcs-bmc-v2", .data = &of_v2_ops }, -- { .compatible = "aspeed,ast2600-kcs-bmc", .data = &of_v2_ops }, -+ { .compatible = "aspeed,ast2600-kcs-bmc-v2", .data = &of_v2_ops }, - { } - }; - MODULE_DEVICE_TABLE(of, ast_kcs_bmc_match); --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0004-ARM-dts-aspeed-g6-Fix-missing-KCS-channel.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0004-ARM-dts-aspeed-g6-Fix-missing-KCS-channel.patch deleted file mode 100644 index 52b7d50a13..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0004-ARM-dts-aspeed-g6-Fix-missing-KCS-channel.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 79893477c941689eda8395769b76e142ae5e87e4 Mon Sep 17 00:00:00 2001 -From: Chia-Wei Wang -Date: Thu, 16 Dec 2021 11:08:00 +0800 -Subject: [PATCH 04/11] ARM: dts: aspeed-g6: Fix missing KCS channel - -The KCS channel property is missing for KCS #2/3/4. - -Signed-off-by: Chia-Wei Wang -Change-Id: I9e217d591b49668d43f5fc6650849750b6619f5d ---- - arch/arm/boot/dts/aspeed-g6.dtsi | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi -index 00ac85dbd2b0..d7c4dd269b3f 100644 ---- a/arch/arm/boot/dts/aspeed-g6.dtsi -+++ b/arch/arm/boot/dts/aspeed-g6.dtsi -@@ -561,7 +561,7 @@ - #size-cells = <1>; - ranges = <0x0 0x1e789000 0x1000>; - -- kcs1: kcs@24 { -+ kcs1: kcs1@24 { - compatible = "aspeed,ast2600-kcs-bmc"; - reg = <0x0 0x130>; - interrupts = ; -@@ -570,27 +570,30 @@ - status = "disabled"; - }; - -- kcs2: kcs@28 { -+ kcs2: kcs2@28 { - compatible = "aspeed,ast2600-kcs-bmc"; - reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; -+ kcs_chan = <2>; - status = "disabled"; - }; - -- kcs3: kcs@2c { -+ kcs3: kcs3@2c { - compatible = "aspeed,ast2600-kcs-bmc"; - reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; -+ kcs_chan = <3>; - status = "disabled"; - }; - -- kcs4: kcs@114 { -+ kcs4: kcs4@114 { - compatible = "aspeed,ast2600-kcs-bmc"; - reg = <0x0 0x130>; - interrupts = ; - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; -+ kcs_chan = <4>; - status = "disabled"; - }; - --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0005-macronix-address-3Bytes.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0005-macronix-address-3Bytes.patch deleted file mode 100644 index 116b2f1d3f..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0005-macronix-address-3Bytes.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a4a58d17f5d0140fb99addc051b9d9a8845f72eb Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Fri, 30 Dec 2022 14:49:40 +0000 -Subject: [PATCH 05/11] macronix-address-3Bytes - ---- - drivers/mtd/spi-nor/macronix.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c -index 27498ed0cc0d..eef500b8ea55 100644 ---- a/drivers/mtd/spi-nor/macronix.c -+++ b/drivers/mtd/spi-nor/macronix.c -@@ -74,8 +74,7 @@ static const struct flash_info macronix_parts[] = { - SPI_NOR_QUAD_READ) }, - { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, - { "mx66l51235f", INFO(0xc2201a, 0, 64 * 1024, 1024, -- SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | -- SPI_NOR_4B_OPCODES) }, -+ SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024, - SECT_4K | SPI_NOR_DUAL_READ | - SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0006-Add-Pinctrl-for-EMMC-8-bit-configs.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0006-Add-Pinctrl-for-EMMC-8-bit-configs.patch deleted file mode 100644 index 885b1e09b3..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0006-Add-Pinctrl-for-EMMC-8-bit-configs.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 83d2dbeca0f712b48c5da739f877df6094d242ce Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Thu, 2 Feb 2023 11:35:42 +0000 -Subject: [PATCH 06/11] Add Pinctrl for EMMC 8-bit configs - -This patches add pin control configuration for EMMC 8-bit mode. ---- - arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi -index 7cd4f075e325..659bdfecbad5 100644 ---- a/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi -+++ b/arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi -@@ -857,6 +857,11 @@ - groups = "EMMCG4"; - }; - -+ pinctrl_emmcg8_default: emmcg8_default { -+ function = "EMMC"; -+ groups = "EMMCG8"; -+ }; -+ - pinctrl_sgpm1_default: sgpm1_default { - function = "SGPM1"; - groups = "SGPM1"; --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0007-lipari-dts-file.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0007-lipari-dts-file.patch deleted file mode 100644 index be76235e03..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0007-lipari-dts-file.patch +++ /dev/null @@ -1,460 +0,0 @@ -From e3549d7d35d175baf38476947a74b50bec3ed54f Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Thu, 2 Feb 2023 11:41:21 +0000 -Subject: [PATCH 07/11] lipari dts file - -DTS file for lipari platform ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/aspeed-ast2600-lipari.dts | 427 ++++++++++++++++++++ - 2 files changed, 428 insertions(+) - create mode 100644 arch/arm/boot/dts/aspeed-ast2600-lipari.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index dc225e354791..2f59d344222b 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1457,6 +1457,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \ - aspeed-ast2500-evb.dtb \ - aspeed-ast2600-evb-a1.dtb \ - aspeed-ast2600-evb.dtb \ -+ aspeed-ast2600-lipari.dtb \ - aspeed-bmc-amd-ethanolx.dtb \ - aspeed-bmc-ampere-mtjade.dtb \ - aspeed-bmc-arm-centriq2400-rep.dtb \ -diff --git a/arch/arm/boot/dts/aspeed-ast2600-lipari.dts b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -new file mode 100644 -index 000000000000..accc52160d99 ---- /dev/null -+++ b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -@@ -0,0 +1,427 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+// Copyright (c) 2023 AMD Inc. -+// Author Mushtaq Khan -+ -+/dts-v1/; -+ -+#include "aspeed-g6.dtsi" -+#include -+ -+/ { -+ model = "AST2600 Lipari"; -+ compatible = "aspeed,ast2600"; -+ -+ aliases { -+ serial4 = &uart5; -+ mmc0 = &emmc; -+ mmc1 = &sdhci0; -+ mmc2 = &sdhci1; -+ }; -+ -+ chosen { -+ bootargs = "console=ttyS4,115200n8"; -+ }; -+ -+ memory@80000000 { -+ device_type = "memory"; -+ reg = <0x80000000 0x80000000>; -+ }; -+ -+ reserved-memory { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ gfx_memory: framebuffer { -+ size = <0x01000000>; -+ alignment = <0x01000000>; -+ compatible = "shared-dma-pool"; -+ reusable; -+ }; -+ -+ }; -+ -+ vcc_sdhci0: regulator-vcc-sdhci0 { -+ compatible = "regulator-fixed"; -+ regulator-name = "SDHCI0 Vcc"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpios = <&gpio0 ASPEED_GPIO(V, 0) GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ vccq_sdhci0: regulator-vccq-sdhci0 { -+ compatible = "regulator-gpio"; -+ regulator-name = "SDHCI0 VccQ"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ gpios = <&gpio0 ASPEED_GPIO(V, 1) GPIO_ACTIVE_HIGH>; -+ gpios-states = <1>; -+ states = <3300000 1>, -+ <1800000 0>; -+ }; -+ -+ vcc_sdhci1: regulator-vcc-sdhci1 { -+ compatible = "regulator-fixed"; -+ regulator-name = "SDHCI1 Vcc"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpios = <&gpio0 ASPEED_GPIO(V, 2) GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; -+ -+ vccq_sdhci1: regulator-vccq-sdhci1 { -+ compatible = "regulator-gpio"; -+ regulator-name = "SDHCI1 VccQ"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ gpios = <&gpio0 ASPEED_GPIO(V, 3) GPIO_ACTIVE_HIGH>; -+ gpios-states = <1>; -+ states = <3300000 1>, -+ <1800000 0>; -+ }; -+}; -+ -+&mac2 { -+ status = "okay"; -+ phy-mode = "rmii"; -+ #use-ncsi; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_rmii3_default>; -+}; -+ -+&emmc_controller { -+ status = "okay"; -+}; -+ -+&emmc { -+ status = "okay"; -+ bus-width = <8>; -+ pinctrl-0 = <&pinctrl_emmc_default -+ &pinctrl_emmcg8_default>; -+ non-removable; -+ max-frequency = <100000000>; -+ #max-frequency = <52000000>; -+ #clk-phase-mmc-hs200 = <9>, <225>; -+ clk-phase-mmc-hs200 = <0 27>, <1 185>; -+}; -+ -+&fmc { -+ status = "okay"; -+ -+ flash@0 { -+ status = "okay"; -+ m25p,fast-read; -+ label = "bmc"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+#include "openbmc-flash-layout-64.dtsi" -+ }; -+ -+ flash@1 { -+ status = "okay"; -+ m25p,fast-read; -+ label = "fmc0:1"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@2 { -+ status = "disabled"; -+ }; -+}; -+ -+&spi1 { -+ status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spi1_default>; -+ -+ flash@0 { -+ status = "disabled"; -+ m25p,fast-read; -+ label = "spi1:0"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ flash@1 { -+ status = "disabled"; -+ m25p,fast-read; -+ label = "spi1:1"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+}; -+ -+&spi2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spi2_default &pinctrl_spi2cs1_default -+ &pinctrl_spi2cs2_default &pinctrl_qspi2_default>; -+ status = "okay"; -+ -+ fpga@0 { -+ reg = < 0 >; -+ status = "disabled"; -+ label = "spi2:0"; -+ compatible = "lipari,fpga"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+ fpga@1 { -+ reg = < 1 >; -+ status = "disabled"; -+ label = "spi2:1"; -+ compatible = "lipari,fpga"; -+ spi-max-frequency = <50000000>; -+ spi-tx-bus-width = <1>; -+ spi-rx-bus-width = <1>; -+ }; -+ -+}; -+ -+&i2c0 { -+ status = "okay"; -+}; -+ -+&i2c1 { -+ status = "okay"; -+ -+ at24c04@50 { -+ compatible = "atmel,24c04"; -+ reg = <0x50>; -+ }; -+}; -+ -+&i2c2 { -+ status = "okay"; -+}; -+ -+&i2c3 { -+ status = "okay"; -+ -+ /* -+ * Fan contrller ADT7462 scan for 0x58 and 0x5C -+ * on all i2c buses and calls i2c-detect of driver -+ * and if device is fan controller, instantiates the device. -+ */ -+}; -+ -+&i2c4 { -+ status = "okay"; -+ /* psu as device */ -+}; -+ -+&i2c5 { -+ status = "okay"; -+ -+ lm75@48 { -+ compatible = "national,lm75"; -+ reg = <0x48>; -+ }; -+ lm75@49 { -+ compatible = "national,lm75"; -+ reg = <0x49>; -+ }; -+ lm75@4a { -+ compatible = "national,lm75"; -+ reg = <0x4a>; -+ }; -+}; -+ -+&i2c6 { -+ status = "okay"; -+ -+ tps53688@5e { -+ compatible = "ti,tps53688"; -+ reg = <0x5e>; -+ }; -+ -+}; -+ -+&i2c7 { -+ status = "okay"; -+}; -+ -+&i2c8 { -+ status = "okay"; -+ -+ tps53688@50 { -+ compatible = "ti,tps53688"; -+ reg = <0x50>; -+ }; -+ -+ tps53688@44 { -+ compatible = "ti,tps53688"; -+ reg = <0x44>; -+ }; -+ -+}; -+ -+&i2c9 { -+ status = "okay"; -+}; -+ -+&i2c10 { -+ status = "okay"; -+}; -+ -+&i2c11 { -+ status = "okay"; -+}; -+ -+&i2c12 { -+ status = "okay"; -+ -+ lm75@4a { -+ compatible = "national,lm75"; -+ reg = <0x4a>; -+ }; -+ -+ lm75@49 { -+ compatible = "national,lm75"; -+ reg = <0x49>; -+ }; -+ -+ tmp451@4c { -+ compatible = "ti,tmp451"; -+ reg = <0x4c>; -+ }; -+}; -+ -+&i2c13 { -+ status = "okay"; -+ -+ at24c256@50 { -+ compatible = "atmel,24c256"; -+ reg = <0x50>; -+ }; -+ -+ at24c256@51 { -+ compatible = "atmel,24c256"; -+ reg = <0x51>; -+ }; -+}; -+ -+&i2c14 { -+ status = "okay"; -+}; -+ -+&i2c15 { -+ status = "okay"; -+}; -+ -+&fsim0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&uhci { -+ status = "okay"; -+}; -+ -+&sdc { -+ status = "okay"; -+}; -+ -+/* -+ * The signal voltage of sdhci0 and sdhci1 on AST2600-A2 EVB is able to be -+ * toggled by GPIO pins. -+ * In the reference design, GPIOV0 of AST2600-A2 EVB is connected to the -+ * power load switch that provides 3.3v to sdhci0 vdd, GPIOV1 is connected to -+ * a 1.8v and a 3.3v power load switch that provides signal voltage to -+ * sdhci0 bus. -+ * If GPIOV0 is active high, sdhci0 is enabled, otherwise, sdhci0 is disabled. -+ * If GPIOV1 is active high, 3.3v power load switch is enabled, sdhci0 signal -+ * voltage is 3.3v, otherwise, 1.8v power load switch will be enabled, -+ * sdhci0 signal voltage becomes 1.8v. -+ * AST2600-A2 EVB also supports toggling signal voltage for sdhci1. -+ * The design is the same as sdhci0, it uses GPIOV2 as power-gpio and GPIOV3 -+ * as power-switch-gpio. -+ */ -+&sdhci0 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ sdhci-drive-type = /bits/ 8 <3>; -+ sdhci-caps-mask = <0x7 0x0>; -+ sdhci,wp-inverted; -+ vmmc-supply = <&vcc_sdhci0>; -+ vqmmc-supply = <&vccq_sdhci0>; -+ clk-phase-sd-hs = <7>, <200>; -+}; -+ -+&sdhci1 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ sdhci-drive-type = /bits/ 8 <3>; -+ sdhci-caps-mask = <0x7 0x0>; -+ sdhci,wp-inverted; -+ vmmc-supply = <&vcc_sdhci1>; -+ vqmmc-supply = <&vccq_sdhci1>; -+ clk-phase-sd-hs = <7>, <200>; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+/* -+ * The signal voltage of sdhci0 and sdhci1 on AST2600-A2 EVB is able to be -+ * toggled by GPIO pins. -+ * In the reference design, GPIOV0 of AST2600-A2 EVB is connected to the -+ * power load switch that provides 3.3v to sdhci0 vdd, GPIOV1 is connected to -+ * a 1.8v and a 3.3v power load switch that provides signal voltage to -+ * sdhci0 bus. -+ * If GPIOV0 is active high, sdhci0 is enabled, otherwise, sdhci0 is disabled. -+ * If GPIOV1 is active high, 3.3v power load switch is enabled, sdhci0 signal -+ * voltage is 3.3v, otherwise, 1.8v power load switch will be enabled, -+ * sdhci0 signal voltage becomes 1.8v. -+ * AST2600-A2 EVB also supports toggling signal voltage for sdhci1. -+ * The design is the same as sdhci0, it uses GPIOV2 as power-gpio and GPIOV3 -+ * as power-switch-gpio. -+ */ -+&sdhci0 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ sdhci-drive-type = /bits/ 8 <3>; -+ sdhci-caps-mask = <0x7 0x0>; -+ sdhci,wp-inverted; -+ vmmc-supply = <&vcc_sdhci0>; -+ vqmmc-supply = <&vccq_sdhci0>; -+ clk-phase-sd-hs = <7>, <200>; -+}; -+ -+&sdhci1 { -+ status = "okay"; -+ bus-width = <4>; -+ max-frequency = <100000000>; -+ sdhci-drive-type = /bits/ 8 <3>; -+ sdhci-caps-mask = <0x7 0x0>; -+ sdhci,wp-inverted; -+ vmmc-supply = <&vcc_sdhci1>; -+ vqmmc-supply = <&vccq_sdhci1>; -+ clk-phase-sd-hs = <7>, <200>; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0008-enable-lpc-modules.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0008-enable-lpc-modules.patch deleted file mode 100644 index db6b85a361..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0008-enable-lpc-modules.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 33505b349528bfed849c0aa37f0953e8383d79ed Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Fri, 3 Feb 2023 18:37:39 +0000 -Subject: [PATCH 08/11] enable-lpc-modules - ---- - arch/arm/boot/dts/aspeed-ast2600-lipari.dts | 41 +++++++++++++++++++++ - 1 file changed, 41 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-ast2600-lipari.dts b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -index accc52160d99..9d7d62aac262 100644 ---- a/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -+++ b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -@@ -186,6 +186,47 @@ - - }; - -+&kcs1 { -+ kcs_addr = <0xca0>; -+ status = "okay"; -+}; -+&kcs2 { -+ kcs_addr = <0xca8>; -+ status = "okay"; -+}; -+&kcs3 { -+ kcs_addr = <0xca2>; -+ status = "okay"; -+}; -+&kcs4 { -+ kcs_addr = <0xca4>; -+ status = "okay"; -+}; -+&lpc_ctrl { -+ status = "okay"; -+}; -+&lpc_snoop { -+ status = "okay"; -+ snoop-ports = <0x80>, <0x81>; -+}; -+&lpc_reset { -+ status = "okay"; -+}; -+&uart_routing { -+ status = "okay"; -+}; -+&ibt { -+ status = "okay"; -+}; -+ -+&lpc_pcc { -+ rec-mode = <0x1>; -+ port-addr = <0x80>; -+ port-addr-hbits-select = <0x1>; -+ port-addr-xbits = <0x3>; -+ status = "okay"; -+}; -+ - &i2c0 { - status = "okay"; - }; --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0009-GPIO-and-LED-configs-in-DTS.patch b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0009-GPIO-and-LED-configs-in-DTS.patch deleted file mode 100644 index 9961eca6d1..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/0009-GPIO-and-LED-configs-in-DTS.patch +++ /dev/null @@ -1,129 +0,0 @@ -From d2b9e717656a59e90806643b5080a0f643399ed6 Mon Sep 17 00:00:00 2001 -From: mushtaqk07 -Date: Wed, 15 Feb 2023 06:03:08 +0000 -Subject: [PATCH 09/11] GPIO-and-LED-configs-in-DTS - ---- - arch/arm/boot/dts/aspeed-ast2600-lipari.dts | 106 ++++++++++++++++++++ - 1 file changed, 106 insertions(+) - -diff --git a/arch/arm/boot/dts/aspeed-ast2600-lipari.dts b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -index 9d7d62aac262..4a7e2a57e6b8 100644 ---- a/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -+++ b/arch/arm/boot/dts/aspeed-ast2600-lipari.dts -@@ -80,6 +80,112 @@ - states = <3300000 1>, - <1800000 0>; - }; -+ -+ gpioleds { -+ compatible = "gpio-leds"; -+ ledF0 { -+ label = "ledF0"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 0) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF1 { -+ label = "ledF1"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 1) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF2 { -+ label = "ledF2"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 2) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF3 { -+ label = "ledF3"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 3) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF4 { -+ label = "ledF4"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 4) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF5 { -+ label = "ledF5"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 5) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF6 { -+ label = "ledF6"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 6) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledF7 { -+ label = "ledF7"; -+ gpios = <&gpio0 ASPEED_GPIO(F, 7) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG0 { -+ label = "ledG0"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 0) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG1 { -+ label = "ledG1"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 1) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG2 { -+ label = "ledG2"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 2) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG3 { -+ label = "ledG3"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 3) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG4 { -+ label = "ledG4"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 4) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG5 { -+ label = "ledG5"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 5) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG6 { -+ label = "ledG6"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 6) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ ledG7 { -+ label = "ledG7"; -+ gpios = <&gpio0 ASPEED_GPIO(G, 7) GPIO_ACTIVE_HIGH>; -+ default-state = "on"; -+ }; -+ }; -+ -+ bmc_gpio_cfg { -+ compatible = "lipari_gpios"; -+ -+ gpioq-gpios = <&gpio0 ASPEED_GPIO(Q,0) GPIO_ACTIVE_HIGH>, -+ <&gpio0 ASPEED_GPIO(Q,1) GPIO_ACTIVE_HIGH>, -+ <&gpio0 ASPEED_GPIO(Q,2) GPIO_ACTIVE_HIGH>, -+ <&gpio0 ASPEED_GPIO(Q,5) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(Q,6) GPIO_ACTIVE_HIGH>, -+ <&gpio0 ASPEED_GPIO(Q,7) GPIO_ACTIVE_HIGH>; -+ -+ gpiob-gpios = <&gpio0 ASPEED_GPIO(B,1) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(B,2) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(B,3) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(B,4) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(B,6) GPIO_ACTIVE_LOW>; -+ -+ gpioy-gpios = <&gpio0 ASPEED_GPIO(Y,0) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(Y,1) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(Y,2) GPIO_ACTIVE_LOW>, -+ <&gpio0 ASPEED_GPIO(Y,3) GPIO_ACTIVE_LOW>; -+ }; - }; - - &mac2 { --- -2.17.1 - diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/lipari.cfg b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/lipari.cfg deleted file mode 100644 index ad20ab46cf..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed/lipari.cfg +++ /dev/null @@ -1,23 +0,0 @@ -CONFIG_IPMI_KCS_BMC_CDEV_IPMI=y -CONFIG_IPMI_KCS_BMC_SERIO=y -CONFIG_IPMI_KCS_BMC_CDEV_RAW=y -CONFIG_ASPEED_BT_IPMI_BMC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_SENSORS_LM75=y -CONFIG_SENSORS_TMP421=y -CONFIG_SENSORS_TPS53679=y -CONFIG_I2C_ASPEED=y -CONFIG_HWMON=y -CONFIG_ASPEED_UART_ROUTING=y -CONFIG_MODULES=y -CONFIG_VIDEO_DEV=n -CONFIG_MEDIA_CONTROLLER=n -CONFIG_MEDIA_PLATFORM_SUPPORT=n -CONFIG_MEDIA_SUPPORT=n -CONFIG_VIDEO_ASPEED=n -CONFIG_ASPEED_LPC_PCC=y -CONFIG_ASPEED_UDMA=y -CONFIG_SERIAL_8250_ASPEED=y diff --git a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed_%.bbappend deleted file mode 100644 index 75ee45f851..0000000000 --- a/meta-amd/meta-lipari/recipes-kernel/linux/linux-aspeed_%.bbappend +++ /dev/null @@ -1,24 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-aspeed" - -KBRANCH = "dev-5.15" -LINUX_VERSION = "5.15.50" - -SRCREV="478951fa4a5903ebcee4ea12a11718b8f5736c1b" - -DEPENDS += "lzop-native" -SRC_URI += "file://lipari.cfg \ - file://0001-ARM-dts-aspeed-g6-Add-PCC-support.patch \ - file://0002-soc-aspeed-Add-Post-Code-Control.patch \ - file://0003-ipmi-kcs-aspeed-g6-Use-v1-binding.patch \ - file://0004-ARM-dts-aspeed-g6-Fix-missing-KCS-channel.patch \ - file://0005-macronix-address-3Bytes.patch \ - file://0006-Add-Pinctrl-for-EMMC-8-bit-configs.patch \ - file://0007-lipari-dts-file.patch \ - file://0008-enable-lpc-modules.patch \ - file://0009-GPIO-and-LED-configs-in-DTS.patch \ - file://0010-serial-8250-Add-Aspeed-UART-driver-with-DMA-supporte.patch \ - file://0011-soc-aspeed-udma-Reset-TX-RX-DAM-at-UART-shutdown.patch \ - file://0012-vuart-dts-changes.patch \ - " -RRECOMMENDS_${KERNEL_PACKAGE_NAME}-base = "" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" diff --git a/meta-amd/meta-lipari/recipes-phosphor/flash/phosphor-software-manager_git.bbappend b/meta-amd/meta-lipari/recipes-phosphor/flash/phosphor-software-manager_git.bbappend deleted file mode 100644 index 81bc04ed62..0000000000 --- a/meta-amd/meta-lipari/recipes-phosphor/flash/phosphor-software-manager_git.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -PACKAGECONFIG[flash_scm_fpga] := "" -PACKAGECONFIG[flash_hpm_fpga] := "" -PACKAGECONFIG[flash_vr] := "" -PACKAGECONFIG[flash_retimer] := "" diff --git a/meta-amd/meta-lipari/recipes-phosphor/images/obmc-phosphor-initramfs.bbappend b/meta-amd/meta-lipari/recipes-phosphor/images/obmc-phosphor-initramfs.bbappend deleted file mode 100644 index 41f9b3e71f..0000000000 --- a/meta-amd/meta-lipari/recipes-phosphor/images/obmc-phosphor-initramfs.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -DEPENDS += "kernel-module-liparigpio" -PACKAGE_INSTALL += "kernel-module-liparigpio" - -RDEPENDS_${PN} += "e2fsprogs-mke2fs" -IMAGE_INSTALL_append = " e2fsprogs-mke2fs" diff --git a/meta-amd/meta-lipari/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bbappend b/meta-amd/meta-lipari/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bbappend deleted file mode 100644 index 0691b66252..0000000000 --- a/meta-amd/meta-lipari/recipes-phosphor/initrdscripts/obmc-phosphor-initfs.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils} \ - e2fsprogs-mke2fs" - -IMAGE_INSTALL_append = " e2fsprogs-mke2fs" diff --git a/meta-amd/meta-sh5/recipes-amd/amd-yaap/amd-yaap.bbappend b/meta-amd/meta-sh5/recipes-amd/amd-yaap/amd-yaap.bbappend deleted file mode 100644 index 55c8282adb..0000000000 --- a/meta-amd/meta-sh5/recipes-amd/amd-yaap/amd-yaap.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -SUMMARY = "AMD YAAPd Jtag server Application CoolReset Files for SH5" - -do_install_append() { - install -m 0644 ${S}/Data/SH5/1P/* ${D}${sysconfdir}/${BPN}/1P/ - install -m 0644 ${S}/Data/SH5/2P/* ${D}${sysconfdir}/${BPN}/2P/ -} - - diff --git a/meta-amd/meta-sp5/recipes-amd/amd-yaap/amd-yaap.bbappend b/meta-amd/meta-sp5/recipes-amd/amd-yaap/amd-yaap.bbappend deleted file mode 100644 index 418ef99965..0000000000 --- a/meta-amd/meta-sp5/recipes-amd/amd-yaap/amd-yaap.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -SUMMARY = "AMD YAAPd Jtag server Application CoolReset Files for SP5" - -do_install_append() { - install -m 0644 ${S}/Data/SP5/1P/* ${D}${sysconfdir}/${BPN}/1P/ - install -m 0644 ${S}/Data/SP5/2P/* ${D}${sysconfdir}/${BPN}/2P/ -} diff --git a/meta-amd/meta-sp6/recipes-amd/amd-yaap/amd-yaap.bbappend b/meta-amd/meta-sp6/recipes-amd/amd-yaap/amd-yaap.bbappend deleted file mode 100644 index ca45273dce..0000000000 --- a/meta-amd/meta-sp6/recipes-amd/amd-yaap/amd-yaap.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -SUMMARY = "AMD YAAPd Jtag server Application CoolReset Files for SP6" - -do_install_append() { - install -m 0644 ${S}/Data/SP6/1P/* ${D}${sysconfdir}/${BPN}/1P/ - install -m 0644 ${S}/Data/SP6/2P/* ${D}${sysconfdir}/${BPN}/2P/ -} diff --git a/meta-amd/meta-turin/recipes-amd/amd-yaap/amd-yaap.bbappend b/meta-amd/meta-turin/recipes-amd/amd-yaap/amd-yaap.bbappend deleted file mode 100644 index 7e4c8e18ed..0000000000 --- a/meta-amd/meta-turin/recipes-amd/amd-yaap/amd-yaap.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -SUMMARY = "AMD YAAPd Jtag server Application CoolReset Files for Turin" - -do_install_append() { - install -m 0644 ${S}/Data/Turin/1P/* ${D}${sysconfdir}/${BPN}/1P/ - install -m 0644 ${S}/Data/Turin/2P/* ${D}${sysconfdir}/${BPN}/2P/ -} diff --git a/meta-amd/meta-turin/recipes-kernel/linux/linux-aspeed/turin.cfg b/meta-amd/meta-turin/recipes-kernel/linux/linux-aspeed/turin.cfg old mode 100644 new mode 100755 index ef2cad2297..9486f7c443 --- a/meta-amd/meta-turin/recipes-kernel/linux/linux-aspeed/turin.cfg +++ b/meta-amd/meta-turin/recipes-kernel/linux/linux-aspeed/turin.cfg @@ -1 +1,3 @@ CONFIG_SENSORS_NCT7362=y +CONFIG_SENSORS_MP2857=y +CONFIG_SENSORS_SIC458=y