ipq4018: add TCSR definitions from Linux.

These are hardware configuration options which are required in
the linux/openwrt device trees for the IPQ4018/IPQ4019 devices.

Since this isn't obtained from linux upstream but instead from
openwrt, this can't go in contrib; instead it is going in
sys/dts/include/ .

Obtained from: OpenWRT

Tested:

* IPQ4019 ASUS RT-AC58U AP, initial bootstrapping
This commit is contained in:
Adrian Chadd 2021-10-15 20:11:46 -07:00
parent 9b7501e797
commit 8e53cd7099
3 changed files with 29 additions and 2 deletions

View File

@ -30,7 +30,7 @@ S= ../../..
.endif
.include "$S/conf/kern.pre.mk"
INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include
INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include -I$$/dts/include
LINUX_DTS_VERSION!= awk '/freebsd,dts-version/ { sub(/;$$/,"", $$NF); print $$NF }' $S/dts/freebsd-compatible.dts
CFLAGS += -DLINUX_DTS_VERSION=\"${LINUX_DTS_VERSION}\"

View File

@ -0,0 +1,27 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. */
#ifndef __DT_BINDINGS_QCOM_TCSR_H__
#define __DT_BINDINGS_QCOM_TCSR_H__
#define TCSR_USB_SELECT_USB3_P0 0x1
#define TCSR_USB_SELECT_USB3_P1 0x2
#define TCSR_USB_SELECT_USB3_DUAL 0x3
#define TCSR_USB_HSPHY_HOST_MODE 0x00E700E7
#define TCSR_USB_HSPHY_DEVICE_MODE 0x00C700E7
#define TCSR_ESS_PSGMII 0
#define TCSR_ESS_PSGMII_RGMII5 1
#define TCSR_ESS_PSGMII_RMII0 2
#define TCSR_ESS_PSGMII_RMII1 4
#define TCSR_ESS_PSGMII_RMII0_RMII1 6
#define TCSR_ESS_PSGMII_RGMII4 9
#define TCSR_WIFI_GLB_CFG 0x41000000
#define TCSR_WIFI_NOC_MEMTYPE_M0_M2 0x02222222
#define IPQ806X_TCSR_REG_A_ADM_CRCI_MUX_SEL 0
#define IPQ806X_TCSR_REG_B_ADM_CRCI_MUX_SEL 1
#endif

View File

@ -23,6 +23,6 @@ fi
for d in ${dts}; do
dtb="${dtb_path}/$(basename "$d" .dts).dtb"
${ECHO} "converting $d -> $dtb"
${CPP} -P -x assembler-with-cpp -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -I "$S/contrib/device-tree/src/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null |
${CPP} -P -x assembler-with-cpp -I "$S/dts/include" -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -I "$S/contrib/device-tree/src/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null |
${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" -i "$S/contrib/device-tree/src/"
done