backport noyau linux 5.4 car la 5.10 ne fonctionne pas sur le mmc
This commit is contained in:
@@ -46,7 +46,7 @@ UBOOT_LOADADDRESS = "0x80008000"
|
||||
##########################################################
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
|
||||
PREFERRED_VERSION_linux-ti-staging ?= "5.10%"
|
||||
PREFERRED_VERSION_linux-ti-staging ?= "5.4%"
|
||||
|
||||
#KERNEL_IMAGETYPE = "zImage"
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
@@ -34,41 +34,17 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
lis3_reg: fixedregulator1 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "lis3_reg";
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
/* TPS650250 PMIC */
|
||||
v1_8d_reg: fixedregulator-v1_8d {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "v1_8d";
|
||||
vin-supply = <&vbat>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
/* TPS650250 PCMIC */
|
||||
v3_3d_reg: fixedregulator-v3_3d {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "v3_3d";
|
||||
vin-supply = <&vbat>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
vmmcsd_fixed: fixedregulator0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmcsd_fixed";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
pinctrl-names = "default";
|
||||
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
/* /board/silica/pengwyn/mux.c => I2C pins C16(scl)/C17(sda) */
|
||||
//static struct module_pin_mux i2c0_pin_mux[] = {
|
||||
// {OFFSET(i2c0_sda), (MODE(0) | RXACTIVE |
|
||||
@@ -77,10 +53,17 @@
|
||||
// PULLUDEN | SLEWCTRL)}, /* I2C0_SCLK */
|
||||
// {-1},
|
||||
//};
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c1_pins: pinmux_i2c1_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE2) /* spi0_d1.i2c1_sda */
|
||||
AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE2) /* spi0_cs0.i2c1_scl */
|
||||
AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE2) /* spi0_d1.i2c1_sda */
|
||||
AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE2) /* spi0_cs0.i2c1_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -91,14 +74,20 @@
|
||||
>;
|
||||
};
|
||||
|
||||
//uart1_pins: pinmux_uart1_pins {
|
||||
// pinctrl-single,pins = <
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT, MUX_MODE0)
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
|
||||
// >;
|
||||
//};
|
||||
uart1_pins: pinmux_uart1_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
|
||||
>;
|
||||
};
|
||||
|
||||
clkout1_pin: pinmux_clkout1_pin {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3) /* xdma_event_intr0.clkout1 */
|
||||
>;
|
||||
};
|
||||
|
||||
clkout2_pin: pinmux_clkout2_pin {
|
||||
pinctrl-single,pins = <
|
||||
@@ -145,12 +134,6 @@
|
||||
>;
|
||||
};
|
||||
|
||||
//ecap0_pins: backlight_pins {
|
||||
// pinctrl-single,pins = <
|
||||
// AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, 0x0, MUX_MODE0)
|
||||
// >;
|
||||
//};
|
||||
|
||||
/* /board/silica/pengwyn/mux.c => MII pins */
|
||||
//static struct module_pin_mux mii1_pin_mux[] = {
|
||||
// {OFFSET(mii1_rxerr), MODE(0) | RXACTIVE}, /* MII1_RXERR */
|
||||
@@ -235,28 +218,17 @@
|
||||
//};
|
||||
mmc1_pins: pinmux_mmc1_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_SPI0_CS1, PIN_INPUT, MUX_MODE5) /* spi0_cs1.mmc0_sdcd.gpio0_6 */
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT0, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT1, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT2, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_DAT3, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_CMD, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MMC0_CLK, PIN_INPUT_PULLUP, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT, MUX_MODE4) /* mcasp0_aclkr.mmc0_sdwp */
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_INPUT, MUX_MODE4) /* mcasp0_aclkx.mmc0_sdcd */
|
||||
AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_INPUT, MUX_MODE4) /* mcasp0_aclkr.mmc0_sdwp */
|
||||
>;
|
||||
};
|
||||
|
||||
//mmc3_pins: pinmux_mmc3_pins {
|
||||
// pinctrl-single,pins = <
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_A2, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_A3, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
|
||||
// AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
|
||||
// >;
|
||||
//};
|
||||
|
||||
mcasp1_pins: mcasp1_pins {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_PADCONF(AM335X_PIN_MII1_CRS, PIN_INPUT_PULLDOWN, MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
|
||||
@@ -274,13 +246,6 @@
|
||||
AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
//dcan1_pins_default: dcan1_pins_default {
|
||||
// pinctrl-single,pins = <
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT, MUX_MODE2) /* uart0_ctsn.d_can1_tx */
|
||||
// AM33XX_PADCONF(AM335X_PIN_UART0_RTSN, PIN_INPUT_PULLDOWN, MUX_MODE2) /* uart0_rtsn.d_can1_rx */
|
||||
// >;
|
||||
//};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
@@ -290,14 +255,12 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/*
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
*/
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
@@ -322,56 +285,17 @@
|
||||
status = "okay";
|
||||
clock-frequency = <100000>;
|
||||
|
||||
lis331dlh: lis331dlh@18 {
|
||||
compatible = "st,lis331dlh", "st,lis3lv02d";
|
||||
reg = <0x18>;
|
||||
Vdd-supply = <&lis3_reg>;
|
||||
Vdd_IO-supply = <&lis3_reg>;
|
||||
|
||||
st,click-single-x;
|
||||
st,click-single-y;
|
||||
st,click-single-z;
|
||||
st,click-thresh-x = <10>;
|
||||
st,click-thresh-y = <10>;
|
||||
st,click-thresh-z = <10>;
|
||||
st,irq1-click;
|
||||
st,irq2-click;
|
||||
st,wakeup-x-lo;
|
||||
st,wakeup-x-hi;
|
||||
st,wakeup-y-lo;
|
||||
st,wakeup-y-hi;
|
||||
st,wakeup-z-lo;
|
||||
st,wakeup-z-hi;
|
||||
st,min-limit-x = <120>;
|
||||
st,min-limit-y = <120>;
|
||||
st,min-limit-z = <140>;
|
||||
st,max-limit-x = <550>;
|
||||
st,max-limit-y = <550>;
|
||||
st,max-limit-z = <750>;
|
||||
};
|
||||
|
||||
// TSL2550 : Ambient light sensor with I2C Interface
|
||||
tsl2550: tsl2550@39 {
|
||||
compatible = "taos,tsl2550";
|
||||
reg = <0x39>;
|
||||
};
|
||||
|
||||
// TMP275 : Temperature Sensor With I2C Interface
|
||||
tmp275: tmp275@48 {
|
||||
compatible = "ti,tmp275";
|
||||
reg = <0x48>;
|
||||
};
|
||||
|
||||
tlv320aic3106: tlv320aic3106@1b {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "ti,tlv320aic3106";
|
||||
reg = <0x1b>;
|
||||
status = "okay";
|
||||
|
||||
/* Regulators */
|
||||
AVDD-supply = <&v3_3d_reg>;
|
||||
IOVDD-supply = <&v3_3d_reg>;
|
||||
DRVDD-supply = <&v3_3d_reg>;
|
||||
DVDD-supply = <&v1_8d_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
&elm {
|
||||
@@ -386,12 +310,14 @@
|
||||
nand@0,0 {
|
||||
compatible = "ti,omap2-nand";
|
||||
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
|
||||
interrupt-parent = <&gpmc>;
|
||||
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
|
||||
<1 IRQ_TYPE_NONE>; /* termcount */
|
||||
//interrupt-parent = <&gpmc>;
|
||||
//interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
|
||||
// <1 IRQ_TYPE_NONE>; /* termcount */
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <100>;
|
||||
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
|
||||
ti,nand-xfer-type = "prefetch-dma";
|
||||
ti,nand-ecc-opt = "bch8";
|
||||
ti,nand-ecc-opt = "bch16";
|
||||
ti,elm-id = <&elm>;
|
||||
nand-bus-width = <8>;
|
||||
gpmc,device-width = <1>;
|
||||
@@ -409,6 +335,8 @@
|
||||
gpmc,access-ns = <64>;
|
||||
gpmc,rd-cycle-ns = <82>;
|
||||
gpmc,wr-cycle-ns = <82>;
|
||||
gpmc,wait-on-read = "true";
|
||||
gpmc,wait-on-write = "true";
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,clk-activation-ns = <0>;
|
||||
@@ -422,67 +350,41 @@
|
||||
#size-cells = <1>;
|
||||
partition@0 {
|
||||
label = "NAND.SPL";
|
||||
reg = <0x00000000 0x000020000>;
|
||||
reg = <0x000000000000 0x000000080000>;
|
||||
};
|
||||
partition@1 {
|
||||
label = "NAND.SPL.backup1";
|
||||
reg = <0x00020000 0x00020000>;
|
||||
reg = <0x000000080000 0x000000100000>;
|
||||
};
|
||||
partition@2 {
|
||||
label = "NAND.SPL.backup2";
|
||||
reg = <0x00040000 0x00020000>;
|
||||
reg = <0x000000180000 0x000000180000>;
|
||||
};
|
||||
partition@3 {
|
||||
label = "NAND.SPL.backup3";
|
||||
reg = <0x00060000 0x00020000>;
|
||||
reg = <0x000000300000 0x000000200000>;
|
||||
};
|
||||
partition@4 {
|
||||
label = "NAND.u-boot-spl-os";
|
||||
reg = <0x00080000 0x00040000>;
|
||||
label = "NAND.u-boot";
|
||||
reg = <0x000000500000 0x000000380000>;
|
||||
};
|
||||
partition@5 {
|
||||
label = "NAND.u-boot";
|
||||
reg = <0x000C0000 0x00100000>;
|
||||
label = "NAND.u-boot-env";
|
||||
reg = <0x000000880000 0x000000400000>;
|
||||
};
|
||||
partition@6 {
|
||||
label = "NAND.u-boot-env";
|
||||
reg = <0x001C0000 0x00020000>;
|
||||
label = "NAND.kernel";
|
||||
reg = <0x000000C80000 0x000001000000>;
|
||||
};
|
||||
partition@7 {
|
||||
label = "NAND.u-boot-env.backup1";
|
||||
reg = <0x001E0000 0x00020000>;
|
||||
};
|
||||
partition@8 {
|
||||
label = "NAND.kernel";
|
||||
reg = <0x00200000 0x00800000>;
|
||||
};
|
||||
partition@9 {
|
||||
label = "NAND.file-system";
|
||||
reg = <0x00A00000 0x0F600000>;
|
||||
reg = <0x000001C80000 0x00003E180000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "tps65910.dtsi"
|
||||
|
||||
&mcasp1 {
|
||||
#sound-dai-cells = <0>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&mcasp1_pins>;
|
||||
pinctrl-1 = <&mcasp1_pins_sleep>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
op-mode = <0>; /* MCASP_IIS_MODE */
|
||||
tdm-slots = <2>;
|
||||
/* 4 serializers */
|
||||
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
|
||||
0 0 1 2
|
||||
>;
|
||||
tx-num-evt = <32>;
|
||||
rx-num-evt = <32>;
|
||||
};
|
||||
|
||||
&tps {
|
||||
vcc1-supply = <&vbat>;
|
||||
vcc2-supply = <&vbat>;
|
||||
@@ -598,25 +500,26 @@
|
||||
ti,adc-channels = <4 5 6 7>;
|
||||
};
|
||||
};
|
||||
/*
|
||||
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
//vmmc-supply = <&vmmc_reg>; // supply node for card's power
|
||||
vmmc-supply = <&vmmcsd_fixed>; // supply node for card's power
|
||||
//vqmmc-supply = <&vmmc_reg>; // supply node for IO line power
|
||||
broken-cd; // --> use polling mode for card detection
|
||||
st,neg-edge;
|
||||
st,sig-dir;
|
||||
st,use-ckin;
|
||||
bus-width = <4>;
|
||||
// --> sd modes supported
|
||||
sd-uhs-sdr12; // SD UHS SDR12 speed is supported
|
||||
sd-uhs-sdr25; // SD UHS SDR25 speed is supported
|
||||
sd-uhs-sdr50; // SD UHS SDR50 speed is supported
|
||||
sd-uhs-ddr50; // SD UHS DDR50 speed is supported
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
*/
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
vqmmc-supply = <&vmmc_reg>;
|
||||
bus-width = <4>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
||||
cd-inverted;
|
||||
cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>; // specify GPIOs for card detection
|
||||
wp-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>; /* GPIO1_28 */
|
||||
};
|
||||
|
||||
&sham {
|
||||
@@ -627,14 +530,7 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
//&dcan1 {
|
||||
// status = "disabled"; /* Enable only if Profile 1 is selected */
|
||||
// pinctrl-names = "default";
|
||||
// pinctrl-0 = <&dcan1_pins_default>;
|
||||
//};
|
||||
|
||||
&rtc {
|
||||
clocks = <&clk_32768_ck>, <&clk_24mhz_clkctrl AM3_CLK_24MHZ_CLKDIV32K_CLKCTRL 0>;
|
||||
clock-names = "ext-clk", "int-clk";
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Upstream kernel-devicetree.bbclass only supports bundling the DTB with
|
||||
# zImage. The factory u-boot on lego-ev3 EEPROM only supports uImage, so we
|
||||
# append the DTB to the final uImage here.
|
||||
|
||||
do_deploy:append() {
|
||||
if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
|
||||
install -d ${DEPLOYDIR}
|
||||
for dtbf in ${KERNEL_DEVICETREE}; do
|
||||
dtb=`normalize_dtb "$dtbf"`
|
||||
dtb_ext=${dtb##*.}
|
||||
dtb_base_name=`basename $dtb .$dtb_ext`
|
||||
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
|
||||
if [ "$type" = "uImage" ]; then
|
||||
cat ${D}/${KERNEL_IMAGEDEST}/$type \
|
||||
${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
|
||||
> ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin
|
||||
ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \
|
||||
${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin
|
||||
cat ${D}/${KERNEL_IMAGEDEST}/$type \
|
||||
${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
|
||||
> ${DEPLOYDIR}/$type
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
# Add concept of machine variants to split DTBs into subsets
|
||||
#
|
||||
# Use these for temporary overrides
|
||||
CMEM_MACHINE = "${MACHINE}"
|
||||
CMEM_MACHINE_am57xx-evm = "am571x am572x am572idk am5729-beagleboneai am574x"
|
||||
CMEM_MACHINE_am57xx-hs-evm = "am571x am572x am572idk am5729-beagleboneai am574x"
|
||||
CMEM_MACHINE_dra7xx-evm = "dra71x dra72x dra74x dra76x"
|
||||
CMEM_MACHINE_dra7xx-hs-evm = "dra71x dra72x dra74x dra76x"
|
||||
|
||||
# Set cmem.dtsi per machine or machine variant
|
||||
CMEM_DTSI = "cmem.dtsi"
|
||||
CMEM_DTSI_am571x = "cmem-am571x.dtsi"
|
||||
CMEM_DTSI_am572idk = "cmem-am572idk.dtsi"
|
||||
CMEM_DTSI_am5729-beagleboneai = "cmem-am5729-beagleboneai.dtsi"
|
||||
CMEM_DTSI_am574x = "cmem-am574x.dtsi"
|
||||
CMEM_DTSI_dra71x = "cmem-dra71x.dtsi"
|
||||
CMEM_DTSI_dra72x = "cmem-dra72x.dtsi"
|
||||
CMEM_DTSI_dra76x = "cmem-dra76x.dtsi"
|
||||
|
||||
# Split device trees between variants
|
||||
CMEM_DEVICETREE = "${KERNEL_DEVICETREE}"
|
||||
CMEM_DEVICETREE_am571x = "am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb am571x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_am572x = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revc.dtb"
|
||||
CMEM_DEVICETREE_am572idk = "am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb am572x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_am5729-beagleboneai = "am5729-beagleboneai.dtb"
|
||||
CMEM_DEVICETREE_am574x = "am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra71x = "dra71-evm.dtb"
|
||||
CMEM_DEVICETREE_dra72x = "dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb dra72-evm-lcd-osd101t2587.dtb \
|
||||
dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-osd101t2045.dtb dra7-evm-lcd-osd101t2587.dtb"
|
||||
CMEM_DEVICETREE_dra76x = "dra76-evm.dtb dra76-evm-tfp410.dtb"
|
||||
|
||||
# Flag to enable CMEM injection
|
||||
RESERVE_CMEM ?= "0"
|
||||
|
||||
# Variables which influence setup_cmem
|
||||
CMEM_VARS = "RESERVE_CMEM CMEM_MACHINE"
|
||||
CMEM_VARS += "CMEM_DTSI ${@' '.join(map(lambda s: 'CMEM_DTSI_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}"
|
||||
CMEM_VARS += "CMEM_DEVICETREE ${@' '.join(map(lambda s: 'CMEM_DEVICETREE_' + s, (d.getVar('CMEM_MACHINE') or '').split()))}"
|
||||
|
||||
# Add correct cmem.dtsi to SRC_URI for each variant for a given machine
|
||||
python do_unpack() {
|
||||
old_overrides = d.getVar('OVERRIDES', False)
|
||||
|
||||
# Initialize with empty string to simplify logic to append to SRC_URI
|
||||
cmem_dtsi = set([''])
|
||||
|
||||
for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split():
|
||||
# Create copy of data for additional override
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
cmem_dtsi.add(localdata.getVar('CMEM_DTSI'))
|
||||
|
||||
d.appendVar('SRC_URI', ' file://'.join(cmem_dtsi))
|
||||
bb.build.exec_func('base_do_unpack', d)
|
||||
}
|
||||
|
||||
python do_setup_cmem() {
|
||||
import shutil
|
||||
|
||||
old_overrides = d.getVar('OVERRIDES', False)
|
||||
|
||||
if d.getVar('RESERVE_CMEM') is '1':
|
||||
for cmem_machine in (d.getVar('CMEM_MACHINE') or '').split():
|
||||
# Create copy of data for additional override
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar('OVERRIDES', '%s:%s' % (cmem_machine, old_overrides))
|
||||
bb.data.update_data(localdata)
|
||||
|
||||
# Get source directory and dtsi filename
|
||||
src_dir = localdata.getVar('WORKDIR')
|
||||
src_dtsi = localdata.getVar('CMEM_DTSI')
|
||||
|
||||
# Get destination directory and destination dtsi filename which adds
|
||||
# the MACHINE prefix.
|
||||
dst_dir = os.path.join(localdata.getVar('S'), localdata.expand('arch/${ARCH}/boot/dts'))
|
||||
dst_dtsi = localdata.expand('${MACHINE}-${CMEM_DTSI}')
|
||||
|
||||
# Copy cmem.dtsi into source tree
|
||||
if localdata.getVar('ARCH') is 'arm64':
|
||||
shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,'ti',dst_dtsi))
|
||||
else:
|
||||
shutil.copy(os.path.join(src_dir,src_dtsi), os.path.join(dst_dir,dst_dtsi))
|
||||
|
||||
# Inject dtsi into each dts in list
|
||||
for dtb in (localdata.getVar('CMEM_DEVICETREE') or '').split():
|
||||
dts = dtb[:-4] + '.dts'
|
||||
|
||||
with open(os.path.join(dst_dir,dts), 'a') as dts_file:
|
||||
dts_file.write('\n#include "%s"\n' % dst_dtsi)
|
||||
}
|
||||
|
||||
do_patch[postfuncs] += "do_setup_cmem"
|
||||
do_patch[vardeps] += "${CMEM_VARS}"
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -23,7 +23,7 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
@@ -0,0 +1,192 @@
|
||||
&pruss_soc_bus {
|
||||
uio_pruss_mdio: uio_mdio@4a332400 {
|
||||
compatible = "ti,davinci_mdio";
|
||||
reg = <0x4a332400 0x90>;
|
||||
clocks = <&dpll_core_m4_ck>;
|
||||
clock-names = "fck";
|
||||
bus_freq = <1000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uio_pruss_mem: uio_pruss_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a300000 0x2000>,
|
||||
<0x4a302000 0x2000>,
|
||||
<0x4a310000 0x3000>,
|
||||
<0x4a320000 0x2000>,
|
||||
<0x4a326000 0x2000>,
|
||||
<0x4a32e000 0x31c>,
|
||||
<0x4a332000 0x58>;
|
||||
mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg",
|
||||
"iep", "mii_rt";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_mem2: uio_pruss_mem2 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a328000 0xd4>,
|
||||
<0x4a330000 0x174>,
|
||||
<0x4a332400 0x90>,
|
||||
<0x40302000 0x0e000>;
|
||||
mem-names = "uart", "ecap", "mdio", "ocmc";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_evt0: uio_pruss_evt0 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <20>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt1: uio_pruss_evt1 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <21>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt2: uio_pruss_evt2 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <22>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt3: uio_pruss_evt3 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <23>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt4: uio_pruss_evt4 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <24>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt5: uio_pruss_evt5 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <25>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt6: uio_pruss_evt6 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <26>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
uio_pruss_evt7: uio_pruss_evt7 {
|
||||
compatible = "ti,uio-module-drv";
|
||||
interrupts = <27>;
|
||||
interrupt-mode = <1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_0_mem: uio_pruss_0_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a334000 0x2000>,
|
||||
<0x4a322000 0x400>,
|
||||
<0x4a322400 0x100>;
|
||||
mem-names = "iram", "control", "debug";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
uio_pruss_1_mem: uio_pruss_1_mem {
|
||||
compatible = "ti,uio-module-drv";
|
||||
mem = <0x4a338000 0x2000>,
|
||||
<0x4a324000 0x400>,
|
||||
<0x4a324400 0x100>;
|
||||
mem-names = "iram", "control", "debug";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
uio_pruss_mdio_eth_default: uio_pruss_mdio_eht_default {
|
||||
pinctrl-single,pins = <
|
||||
AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */
|
||||
AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */
|
||||
AM33XX_IOPAD(0x89c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* gpmc_ben0_cle.gpio2_5 */
|
||||
/* disable CPSW MDIO */
|
||||
AM33XX_IOPAD(0x948, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_data.gpio0_0 */
|
||||
AM33XX_IOPAD(0x94c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_clk.gpio0_1 */
|
||||
AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */
|
||||
AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */
|
||||
AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */
|
||||
AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */
|
||||
AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */
|
||||
AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */
|
||||
AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */
|
||||
AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */
|
||||
AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */
|
||||
AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */
|
||||
AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */
|
||||
AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */
|
||||
AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */
|
||||
AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */
|
||||
AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */
|
||||
|
||||
AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */
|
||||
AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */
|
||||
AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */
|
||||
AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */
|
||||
AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */
|
||||
AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */
|
||||
AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */
|
||||
AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */
|
||||
AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */
|
||||
AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */
|
||||
AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */
|
||||
AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */
|
||||
AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */
|
||||
AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */
|
||||
AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */
|
||||
AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uio_pruss_mdio {
|
||||
pinctrl-0 = <&uio_pruss_mdio_eth_default>;
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
reset-delay-us = <2>; /* PHY datasheet states 1uS min */
|
||||
status = "okay";
|
||||
|
||||
uio_pruss_eth0_phy: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
uio_pruss_eth1_phy: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
&pruss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pru0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pru1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_intc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_mdio {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_emac0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pruss_emac1 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_omap2_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_dra7x_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_k2g_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_arm64_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_keystone_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_omapl138_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_am3x_release
|
||||
@@ -0,0 +1 @@
|
||||
use-tisdk-config=ti_sdk_am4x_release
|
||||
@@ -2,10 +2,9 @@
|
||||
# Release under the MIT license (see COPYING.MIT for the terms)
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
#SRC_URI += " \
|
||||
# file://am335x-pengwyn.dts \
|
||||
# file://0001-dts-makefile.patch \
|
||||
# "
|
||||
SRC_URI += " \
|
||||
file://0001-dtc-lexer-extern-yylloc.patch \
|
||||
"
|
||||
#
|
||||
#do_configure:append() {
|
||||
# cp ${WORKDIR}/am335x-pengwyn.dts ${S}/arch/arm/boot/dts/
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
SECTION = "kernel"
|
||||
DESCRIPTION = "Linux kernel for TI devices"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
|
||||
inherit kernel
|
||||
PACKREV = "5.4"
|
||||
require recipes-kernel/linux/setup-defconfig_${PACKREV}.inc
|
||||
#require recipes-kernel/linux/cmem_${PACKREV}.inc
|
||||
require recipes-kernel/linux/ti-uio_${PACKREV}.inc
|
||||
require recipes-kernel/linux/bundle-devicetree_${PACKREV}.inc
|
||||
|
||||
# Look in the generic major.minor directory for files
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-5.4:"
|
||||
|
||||
# Pull in the devicetree files into the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree"
|
||||
|
||||
# Add run-time dependency for PM firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti33x = " amx3-cm3"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti43x = " amx3-cm3"
|
||||
|
||||
# Add run-time dependency for VPE VPDMA firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:dra7xx = " vpdma-fw"
|
||||
|
||||
# Add run-time dependency for Goodix firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:dra7xx = " goodix-fw"
|
||||
|
||||
# Install boot-monitor skern file into /boot dir of rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " boot-monitor"
|
||||
|
||||
# Install ti-sci-fw into /boot dir of rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2g = " ti-sci-fw"
|
||||
|
||||
# Add run-time dependency for SerDes firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " serdes-fw"
|
||||
|
||||
# Add run-time dependency for QMSS PDSP firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:keystone = " qmss-pdsp-fw"
|
||||
|
||||
# Add run-time dependency for NETCP PA firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2hk = " netcp-pa-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2e = " netcp-pa-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2l = " netcp-pa-fw"
|
||||
|
||||
# Add run-time dependency for PRU Ethernet firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am57xx-evm = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am57xx-hs-evm = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti43x = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:ti33x = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:k2g = " prueth-fw"
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:am65xx = " prueth-fw-am65x"
|
||||
|
||||
# Add run-time dependency for Cadence MHDP firmware to the rootfs
|
||||
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:append:j7-evm = " cadence-mhdp-fw"
|
||||
|
||||
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
BRANCH = "ti-linux-5.4.y"
|
||||
|
||||
SRCREV = "6f3bf13d53820fc12432d7052744be2ee046fc92"
|
||||
PV = "5.4.28+git${SRCPV}"
|
||||
|
||||
# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
|
||||
MACHINE_KERNEL_PR:append = "a"
|
||||
PR = "${MACHINE_KERNEL_PR}"
|
||||
|
||||
KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
|
||||
KERNEL_GIT_PROTOCOL = "git"
|
||||
SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \
|
||||
file://defconfig"
|
||||
|
||||
FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb"
|
||||
|
||||
# Special configuration for remoteproc/rpmsg IPC modules
|
||||
module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample"
|
||||
module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus"
|
||||
module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus"
|
||||
KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc"
|
||||
@@ -0,0 +1,92 @@
|
||||
# KERNEL_LOCALVERSION can be set to add a tag to the end of the
|
||||
# kernel version string. such as the commit id
|
||||
def get_git_revision(p):
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip()
|
||||
except OSError:
|
||||
return None
|
||||
|
||||
KERNEL_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}"
|
||||
|
||||
# Check the defconfig file and see if it points to an in kernel
|
||||
# defconfig that should be used, or if it is a complete config file
|
||||
# Or if it points to a combined defconfig that lists both in kernel
|
||||
# defconfig and associated config fragments.
|
||||
|
||||
do_configure() {
|
||||
# Always copy the defconfig file to .config to keep consistency
|
||||
# between the case where there is a real config and the in kernel
|
||||
# tree config
|
||||
cp ${WORKDIR}/defconfig ${B}/.config
|
||||
|
||||
echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
|
||||
echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
|
||||
|
||||
# Zero, when using "tisdk" configs, pass control to defconfig_builder
|
||||
config=`cat ${B}/.config | grep use-tisdk-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
${S}/ti_config_fragments/defconfig_builder.sh -w ${S} -t $config
|
||||
oe_runmake -C ${S} O=${B} "$config"_defconfig
|
||||
else
|
||||
# First, check if pointing to a combined config with config fragments
|
||||
config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
cp ${S}/$config ${B}/.config
|
||||
fi
|
||||
|
||||
# Second, extract any config fragments listed in the defconfig
|
||||
config=`cat ${B}/.config | grep config-fragment | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
configfrags=""
|
||||
for f in $config
|
||||
do
|
||||
# Check if the config fragment is available
|
||||
if [ ! -e "${S}/$f" ]
|
||||
then
|
||||
echo "Could not find kernel config fragment $f"
|
||||
exit 1
|
||||
else
|
||||
# Sanitize config fragment files to be relative to sources
|
||||
configfrags="$configfrags ${S}/$f"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Third, check if pointing to a known in kernel defconfig
|
||||
config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2`
|
||||
if [ -n "$config" ]
|
||||
then
|
||||
oe_runmake -C ${S} O=${B} $config
|
||||
else
|
||||
yes '' | oe_runmake -C ${S} O=${B} oldconfig
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fourth, handle config fragments specified in the recipe
|
||||
# The assumption is that the config fragment will be specified with the absolute path.
|
||||
# E.g. ${WORKDIR}/config1.cfg or ${S}/config2.cfg
|
||||
if [ -n "${KERNEL_CONFIG_FRAGMENTS}" ]
|
||||
then
|
||||
for f in ${KERNEL_CONFIG_FRAGMENTS}
|
||||
do
|
||||
# Check if the config fragment is available
|
||||
if [ ! -e "$f" ]
|
||||
then
|
||||
echo "Could not find kernel config fragment $f"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Now that all the fragments are located merge them
|
||||
if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ]
|
||||
then
|
||||
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
|
||||
yes '' | oe_runmake -C ${S} O=${B} oldconfig
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
SRC_URI:append:keystone = " file://keystone-uio.dtsi"
|
||||
SRC_URI:append:k2hk = " file://k2hk-uio.dtsi"
|
||||
SRC_URI:append:k2l = " file://k2l-uio.dtsi"
|
||||
SRC_URI:append:k2e = " file://k2e-uio.dtsi"
|
||||
SRC_URI:append:k2g = " file://keystone-k2g-pru-uio.dtsi"
|
||||
SRC_URI:append:dra7xx = " file://am57xx-pru-uio.dtsi \
|
||||
file://am571x-pru-uio.dtsi \
|
||||
"
|
||||
SRC_URI:append:ti33x = " file://am335x-pru-uio.dtsi"
|
||||
SRC_URI:append:ti43x = " file://am437x-pru-uio.dtsi"
|
||||
|
||||
DTSI_LIST = ""
|
||||
DTSI_LIST:append:keystone = " keystone-uio.dtsi"
|
||||
DTSI_LIST:append:k2hk = " k2hk-uio.dtsi"
|
||||
DTSI_LIST:append:k2l = " k2l-uio.dtsi"
|
||||
DTSI_LIST:append:k2e = " k2e-uio.dtsi"
|
||||
|
||||
do_setup_uio() {
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
for dtsi in ${DTSI_LIST}
|
||||
do
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
for dtb in ${KERNEL_DEVICETREE}
|
||||
do
|
||||
dts=`echo $dtb | sed -e 's|dtb$|dts|'`
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:dra7xx() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dtsi="am57xx-pru-uio.dtsi"
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
|
||||
dts="am572x-idk-pru-excl-uio.dts"
|
||||
cp ${S}/arch/arm/boot/dts/am572x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
|
||||
dts="am574x-idk-pru-excl-uio.dts"
|
||||
cp ${S}/arch/arm/boot/dts/am574x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
|
||||
dts="am571x-idk-pru-excl-uio.dts"
|
||||
dtsi="am571x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am571x-idk.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:ti33x() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="am335x-icev2-pru-excl-uio.dts"
|
||||
dtsi="am335x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am335x-icev2-prueth.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:ti43x() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="am437x-idk-pru-excl-uio.dts"
|
||||
dtsi="am437x-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/am437x-idk-evm.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_uio:append:k2g() {
|
||||
|
||||
if [ "${ENABLE_TI_UIO_DEVICES}" == "1" ]
|
||||
then
|
||||
dts="keystone-k2g-ice-pru-excl-uio.dts"
|
||||
dtsi="keystone-k2g-pru-uio.dtsi"
|
||||
cp ${S}/arch/arm/boot/dts/keystone-k2g-ice.dts ${S}/arch/arm/boot/dts/$dts
|
||||
cp ${WORKDIR}/${dtsi} ${S}/arch/arm/boot/dts/
|
||||
echo "#include \"${dtsi}\"" >> ${S}/arch/arm/boot/dts/$dts
|
||||
fi
|
||||
}
|
||||
|
||||
do_patch[postfuncs] += "do_setup_uio"
|
||||
Reference in New Issue
Block a user