From nobody Mon Oct 18 19:19:15 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 66AD917F8399; Mon, 18 Oct 2021 19:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY6BC2WRrz4cRd; Mon, 18 Oct 2021 19:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35B88260B5; Mon, 18 Oct 2021 19:19:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IJJF1o080135; Mon, 18 Oct 2021 19:19:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IJJFAO080134; Mon, 18 Oct 2021 19:19:15 GMT (envelope-from git) Date: Mon, 18 Oct 2021 19:19:15 GMT Message-Id: <202110181919.19IJJFAO080134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 8e53cd709943 - main - ipq4018: add TCSR definitions from Linux. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e53cd70994369510b24248aad1352aed70727c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=8e53cd70994369510b24248aad1352aed70727c9 commit 8e53cd70994369510b24248aad1352aed70727c9 Author: Adrian Chadd AuthorDate: 2021-10-16 03:11:46 +0000 Commit: Adrian Chadd CommitDate: 2021-10-18 19:18:01 +0000 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 --- sys/conf/Makefile.arm | 2 +- sys/dts/include/dt-bindings/soc/qcom,tcsr.h | 27 +++++++++++++++++++++++++++ sys/tools/fdt/make_dtb.sh | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 754b43131d6d..9034ffb5e29a 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -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}\" diff --git a/sys/dts/include/dt-bindings/soc/qcom,tcsr.h b/sys/dts/include/dt-bindings/soc/qcom,tcsr.h new file mode 100644 index 000000000000..47540b3b8a04 --- /dev/null +++ b/sys/dts/include/dt-bindings/soc/qcom,tcsr.h @@ -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 diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh index 09d0b3bd9f42..e1a2fa4b1d8a 100755 --- a/sys/tools/fdt/make_dtb.sh +++ b/sys/tools/fdt/make_dtb.sh @@ -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