From 62b9c6e257f4c5643d860d11f2ffd8d0e81db2a3 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 12 Jan 2024 08:50:26 +0100 Subject: [PATCH] ipq807x: v5.4: {e,o}ap102: export MCU and USB related pins This exports MCU/USB related pins in sysfs using 'gpio-export' on the EdgeCore {E,O}AP102 boards as: - mcu-enable - usb-rear-power - usb-side-power - usb-hub-enable Signed-off-by: Piotr Dymacz --- .../boot/dts/qcom/qcom-ipq807x-eap102.dts | 29 +++++++++++++++++++ .../boot/dts/qcom/qcom-ipq807x-oap102.dts | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-eap102.dts b/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-eap102.dts index 59d3209b4..f529c693d 100644 --- a/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-eap102.dts +++ b/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-eap102.dts @@ -29,6 +29,35 @@ stdout-path = "serial0"; }; + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + mcu-enable { + gpio-export,name = "mcu-enable"; + gpio-export,output = <0>; + gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; + }; + + usb-hub-enable { + gpio-export,name = "usb-hub-enable"; + gpio-export,output = <1>; + gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>; + }; + + usb-rear-power { + gpio-export,name = "usb-rear-power"; + gpio-export,output = <1>; + gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; + }; + + usb-side-power { + gpio-export,name = "usb-side-power"; + gpio-export,output = <1>; + gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; + }; + }; + soc { pinctrl@1000000 { pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>; diff --git a/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-oap102.dts b/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-oap102.dts index df133c97b..ef78cdf15 100644 --- a/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-oap102.dts +++ b/feeds/ipq807x_v5.4/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq807x-oap102.dts @@ -29,6 +29,35 @@ stdout-path = "serial0"; }; + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + mcu-enable { + gpio-export,name = "mcu-enable"; + gpio-export,output = <0>; + gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; + }; + + usb-hub-enable { + gpio-export,name = "usb-hub-enable"; + gpio-export,output = <1>; + gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>; + }; + + usb-rear-power { + gpio-export,name = "usb-rear-power"; + gpio-export,output = <1>; + gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>; + }; + + usb-side-power { + gpio-export,name = "usb-side-power"; + gpio-export,output = <1>; + gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; + }; + }; + soc { pinctrl@1000000 { pinctrl-0 = <&mcu_rst &mcu_rsv &usb_rear_pwr &usb_side_pwr &usb_hub_rst>;