1*8ccc0d23SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) 2*8ccc0d23SEmmanuel Vadot/* 3*8ccc0d23SEmmanuel Vadot * Copyright (c) 2024 Cherry Embedded Solutions GmbH 4*8ccc0d23SEmmanuel Vadot * 5*8ccc0d23SEmmanuel Vadot * Device Tree Overlay for the Pre-ICT tester adapter for the Mezzanine 6*8ccc0d23SEmmanuel Vadot * connector on RK3588 Jaguar. 7*8ccc0d23SEmmanuel Vadot * 8*8ccc0d23SEmmanuel Vadot * This adapter has a PCIe Gen2 x1 M.2 M-Key connector and two proprietary 9*8ccc0d23SEmmanuel Vadot * camera connectors (each their own I2C bus, clock, reset and PWM lines as well 10*8ccc0d23SEmmanuel Vadot * as 2-lane CSI). 11*8ccc0d23SEmmanuel Vadot * 12*8ccc0d23SEmmanuel Vadot * This adapter routes some GPIOs to power rails and loops together some other 13*8ccc0d23SEmmanuel Vadot * GPIOs. 14*8ccc0d23SEmmanuel Vadot * 15*8ccc0d23SEmmanuel Vadot * This adapter is used during manufacturing for validating proper soldering of 16*8ccc0d23SEmmanuel Vadot * the mezzanine connector. 17*8ccc0d23SEmmanuel Vadot */ 18*8ccc0d23SEmmanuel Vadot 19*8ccc0d23SEmmanuel Vadot/dts-v1/; 20*8ccc0d23SEmmanuel Vadot/plugin/; 21*8ccc0d23SEmmanuel Vadot 22*8ccc0d23SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 23*8ccc0d23SEmmanuel Vadot#include <dt-bindings/pinctrl/rockchip.h> 24*8ccc0d23SEmmanuel Vadot 25*8ccc0d23SEmmanuel Vadot&{/} { 26*8ccc0d23SEmmanuel Vadot pre_ict_tester_vcc_1v2: regulator-pre-ict-tester-vcc-1v2 { 27*8ccc0d23SEmmanuel Vadot compatible = "regulator-fixed"; 28*8ccc0d23SEmmanuel Vadot regulator-name = "pre_ict_tester_vcc_1v2"; 29*8ccc0d23SEmmanuel Vadot regulator-always-on; 30*8ccc0d23SEmmanuel Vadot regulator-boot-on; 31*8ccc0d23SEmmanuel Vadot regulator-min-microvolt = <1200000>; 32*8ccc0d23SEmmanuel Vadot regulator-max-microvolt = <1200000>; 33*8ccc0d23SEmmanuel Vadot vin-supply = <&vcc_3v3_s3>; 34*8ccc0d23SEmmanuel Vadot }; 35*8ccc0d23SEmmanuel Vadot 36*8ccc0d23SEmmanuel Vadot pre_ict_tester_vcc_2v8: regulator-pre-ict-tester-vcc-2v8 { 37*8ccc0d23SEmmanuel Vadot compatible = "regulator-fixed"; 38*8ccc0d23SEmmanuel Vadot regulator-name = "pre_ict_tester_vcc_2v8"; 39*8ccc0d23SEmmanuel Vadot regulator-always-on; 40*8ccc0d23SEmmanuel Vadot regulator-boot-on; 41*8ccc0d23SEmmanuel Vadot regulator-min-microvolt = <2800000>; 42*8ccc0d23SEmmanuel Vadot regulator-max-microvolt = <2800000>; 43*8ccc0d23SEmmanuel Vadot vin-supply = <&vcc_3v3_s3>; 44*8ccc0d23SEmmanuel Vadot }; 45*8ccc0d23SEmmanuel Vadot}; 46*8ccc0d23SEmmanuel Vadot 47*8ccc0d23SEmmanuel Vadot&combphy0_ps { 48*8ccc0d23SEmmanuel Vadot status = "okay"; 49*8ccc0d23SEmmanuel Vadot}; 50*8ccc0d23SEmmanuel Vadot 51*8ccc0d23SEmmanuel Vadot&gpio3 { 52*8ccc0d23SEmmanuel Vadot pinctrl-0 = <&pre_ict_pwr2gpio>; 53*8ccc0d23SEmmanuel Vadot pinctrl-names = "default"; 54*8ccc0d23SEmmanuel Vadot}; 55*8ccc0d23SEmmanuel Vadot 56*8ccc0d23SEmmanuel Vadot&pcie2x1l2 { 57*8ccc0d23SEmmanuel Vadot pinctrl-names = "default"; 58*8ccc0d23SEmmanuel Vadot pinctrl-0 = <&pcie2x1l2_perstn_m0>; 59*8ccc0d23SEmmanuel Vadot reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; /* PCIE20X1_2_PERSTN_M0 */ 60*8ccc0d23SEmmanuel Vadot vpcie3v3-supply = <&vcc_3v3_s3>; 61*8ccc0d23SEmmanuel Vadot status = "okay"; 62*8ccc0d23SEmmanuel Vadot}; 63*8ccc0d23SEmmanuel Vadot 64*8ccc0d23SEmmanuel Vadot&pinctrl { 65*8ccc0d23SEmmanuel Vadot pcie2x1l2 { 66*8ccc0d23SEmmanuel Vadot pcie2x1l2_perstn_m0: pcie2x1l2-perstn-m0 { 67*8ccc0d23SEmmanuel Vadot rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; 68*8ccc0d23SEmmanuel Vadot }; 69*8ccc0d23SEmmanuel Vadot }; 70*8ccc0d23SEmmanuel Vadot 71*8ccc0d23SEmmanuel Vadot pre-ict-tester { 72*8ccc0d23SEmmanuel Vadot pre_ict_pwr2gpio: pre-ict-pwr2gpio-pins { 73*8ccc0d23SEmmanuel Vadot rockchip,pins = 74*8ccc0d23SEmmanuel Vadot /* 75*8ccc0d23SEmmanuel Vadot * GPIO3_A3 requires two power rails to be properly 76*8ccc0d23SEmmanuel Vadot * routed to the mezzanine connector to report a proper 77*8ccc0d23SEmmanuel Vadot * value: VCC_1V8_S0_1 and VCC_IN_2. It may report an 78*8ccc0d23SEmmanuel Vadot * incorrect value if VCC_1V8_S0_1 isn't properly routed, 79*8ccc0d23SEmmanuel Vadot * but GPIO3_C6 would catch this HW soldering issue. 80*8ccc0d23SEmmanuel Vadot * If VCC_IN_2 is properly routed, GPIO3_A3 should be 81*8ccc0d23SEmmanuel Vadot * LOW. The signal shall not read HIGH in the event 82*8ccc0d23SEmmanuel Vadot * GPIO3_A3 isn't properly routed due to soldering 83*8ccc0d23SEmmanuel Vadot * issue. Therefore, let's enforce a pull-up (which is 84*8ccc0d23SEmmanuel Vadot * the SoC default for this pin). 85*8ccc0d23SEmmanuel Vadot */ 86*8ccc0d23SEmmanuel Vadot <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, 87*8ccc0d23SEmmanuel Vadot /* 88*8ccc0d23SEmmanuel Vadot * GPIO3_A4 is directly routed to VCC_1V8_S0_2 power 89*8ccc0d23SEmmanuel Vadot * rail. It should be HIGH if all is properly soldered. 90*8ccc0d23SEmmanuel Vadot * To guarantee that, a pull-down is enforced (which is 91*8ccc0d23SEmmanuel Vadot * the SoC default for this pin) so that LOW is read if 92*8ccc0d23SEmmanuel Vadot * the loop doesn't exist on HW (soldering issue on 93*8ccc0d23SEmmanuel Vadot * either signals). 94*8ccc0d23SEmmanuel Vadot */ 95*8ccc0d23SEmmanuel Vadot <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>, 96*8ccc0d23SEmmanuel Vadot /* 97*8ccc0d23SEmmanuel Vadot * GPIO3_B2 requires two power rails to be properly 98*8ccc0d23SEmmanuel Vadot * routed to the mezzanine connector to report a proper 99*8ccc0d23SEmmanuel Vadot * value: VCC_1V8_S0_1 and VCC_IN_1. It may report an 100*8ccc0d23SEmmanuel Vadot * incorrect value if VCC_1V8_S0_1 isn't properly routed, 101*8ccc0d23SEmmanuel Vadot * but GPIO3_C6 would catch this HW soldering issue. 102*8ccc0d23SEmmanuel Vadot * If VCC_IN_1 is properly routed, GPIO3_B2 should be 103*8ccc0d23SEmmanuel Vadot * LOW. This is an issue if GPIO3_B2 isn't properly 104*8ccc0d23SEmmanuel Vadot * routed due to soldering issue, because GPIO3_B2 105*8ccc0d23SEmmanuel Vadot * default bias is pull-down therefore being LOW. So 106*8ccc0d23SEmmanuel Vadot * the worst case scenario and the pass scenario expect 107*8ccc0d23SEmmanuel Vadot * the same value. Make GPIO3_B2 a pull-up so that a 108*8ccc0d23SEmmanuel Vadot * soldering issue on GPIO3_B2 reports HIGH but proper 109*8ccc0d23SEmmanuel Vadot * soldering reports LOW. 110*8ccc0d23SEmmanuel Vadot */ 111*8ccc0d23SEmmanuel Vadot <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, 112*8ccc0d23SEmmanuel Vadot /* 113*8ccc0d23SEmmanuel Vadot * GPIO3_C6 is directly routed to VCC_1V8_S0_1 power 114*8ccc0d23SEmmanuel Vadot * rail. It should be HIGH if all is properly soldered. 115*8ccc0d23SEmmanuel Vadot * This is an issue if GPIO3_C6 or VCC_1V8_S0_1 isn't 116*8ccc0d23SEmmanuel Vadot * properly routed due to soldering issue, because 117*8ccc0d23SEmmanuel Vadot * GPIO3_C6 default bias is pull-up therefore being HIGH 118*8ccc0d23SEmmanuel Vadot * in all cases: 119*8ccc0d23SEmmanuel Vadot * - GPIO3_C6 is floating (so HIGH) if GPIO3_C6 is not 120*8ccc0d23SEmmanuel Vadot * routed properly, 121*8ccc0d23SEmmanuel Vadot * - GPIO3_C6 is floating (so HIGH) if VCC_1V8_S0_1 is 122*8ccc0d23SEmmanuel Vadot * not routed properly, 123*8ccc0d23SEmmanuel Vadot * - GPIO3_C6 is HIGH if everything is proper, 124*8ccc0d23SEmmanuel Vadot * Make GPIO3_C6 a pull-down so that a soldering issue 125*8ccc0d23SEmmanuel Vadot * on GPIO3_C6 or VCC_1V8_S0_1 reports LOW but proper 126*8ccc0d23SEmmanuel Vadot * soldering reports HIGH. 127*8ccc0d23SEmmanuel Vadot */ 128*8ccc0d23SEmmanuel Vadot <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>, 129*8ccc0d23SEmmanuel Vadot /* 130*8ccc0d23SEmmanuel Vadot * GPIO3_D2 is routed to VCC_5V0_1 power rail through a 131*8ccc0d23SEmmanuel Vadot * voltage divider on the adapter. 132*8ccc0d23SEmmanuel Vadot * It should be HIGH if all is properly soldered. 133*8ccc0d23SEmmanuel Vadot * To guarantee that, a pull-down is enforced (which is 134*8ccc0d23SEmmanuel Vadot * the SoC default for this pin) so that LOW is read if 135*8ccc0d23SEmmanuel Vadot * the loop doesn't exist on HW (soldering issue on 136*8ccc0d23SEmmanuel Vadot * either signals). 137*8ccc0d23SEmmanuel Vadot */ 138*8ccc0d23SEmmanuel Vadot <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_down>, 139*8ccc0d23SEmmanuel Vadot /* 140*8ccc0d23SEmmanuel Vadot * GPIO3_D3 is routed to VCC_5V0_2 power rail through a 141*8ccc0d23SEmmanuel Vadot * voltage divider on the adapter. 142*8ccc0d23SEmmanuel Vadot * It should be HIGH if all is properly soldered. 143*8ccc0d23SEmmanuel Vadot * To guarantee that, a pull-down is enforced (which is 144*8ccc0d23SEmmanuel Vadot * the SoC default for this pin) so that LOW is read if 145*8ccc0d23SEmmanuel Vadot * the loop doesn't exist on HW (soldering issue on 146*8ccc0d23SEmmanuel Vadot * either signals). 147*8ccc0d23SEmmanuel Vadot */ 148*8ccc0d23SEmmanuel Vadot <3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_down>, 149*8ccc0d23SEmmanuel Vadot /* 150*8ccc0d23SEmmanuel Vadot * GPIO3_D4 is routed to VCC_3V3_S3_1 power rail through 151*8ccc0d23SEmmanuel Vadot * a voltage divider on the adapter. 152*8ccc0d23SEmmanuel Vadot * It should be HIGH if all is properly soldered. 153*8ccc0d23SEmmanuel Vadot * To guarantee that, a pull-down is enforced (which is 154*8ccc0d23SEmmanuel Vadot * the SoC default for this pin) so that LOW is read if 155*8ccc0d23SEmmanuel Vadot * the loop doesn't exist on HW (soldering issue on 156*8ccc0d23SEmmanuel Vadot * either signals). 157*8ccc0d23SEmmanuel Vadot */ 158*8ccc0d23SEmmanuel Vadot <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>, 159*8ccc0d23SEmmanuel Vadot /* 160*8ccc0d23SEmmanuel Vadot * GPIO3_D5 is routed to VCC_3V3_S3_2 power rail through 161*8ccc0d23SEmmanuel Vadot * a voltage divider on the adapter. 162*8ccc0d23SEmmanuel Vadot * It should be HIGH if all is properly soldered. 163*8ccc0d23SEmmanuel Vadot * To guarantee that, a pull-down is enforced (which is 164*8ccc0d23SEmmanuel Vadot * the SoC default for this pin) so that LOW is read if 165*8ccc0d23SEmmanuel Vadot * the loop doesn't exist on HW (soldering issue on 166*8ccc0d23SEmmanuel Vadot * either signals). 167*8ccc0d23SEmmanuel Vadot */ 168*8ccc0d23SEmmanuel Vadot <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>; 169*8ccc0d23SEmmanuel Vadot }; 170*8ccc0d23SEmmanuel Vadot }; 171*8ccc0d23SEmmanuel Vadot}; 172