mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-26 03:49:14 +07:00
d64420e816
Rockchip SoCs use 2 different numbering schemes. Where the gpio- controllers just count 0-31 for their 32 gpios, the underlying iomux controller splits these into 4 separate entities A-D. Device-schematics always use these iomux-values to identify pins, so to make mapping schematics to devicetree easier Andy Yan introduced named constants for the pins but so far we only used them on new additions. Using a sed-script created by Emil Renner Berthing bulk-convert the remaining raw gpio numbers into their descriptive counterparts and also gets rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x mappings: /rockchip,pins *=/bcheck b # to end of script :append-next-line N :check /^[^;]*$/bappend-next-line s/<RK_GPIO\([0-9]\) /<\1 /g s/<\([^ ][^ ]* *\)0 /<\1RK_PA0 /g s/<\([^ ][^ ]* *\)1 /<\1RK_PA1 /g s/<\([^ ][^ ]* *\)2 /<\1RK_PA2 /g s/<\([^ ][^ ]* *\)3 /<\1RK_PA3 /g s/<\([^ ][^ ]* *\)4 /<\1RK_PA4 /g s/<\([^ ][^ ]* *\)5 /<\1RK_PA5 /g s/<\([^ ][^ ]* *\)6 /<\1RK_PA6 /g s/<\([^ ][^ ]* *\)7 /<\1RK_PA7 /g s/<\([^ ][^ ]* *\)8 /<\1RK_PB0 /g s/<\([^ ][^ ]* *\)9 /<\1RK_PB1 /g s/<\([^ ][^ ]* *\)10 /<\1RK_PB2 /g s/<\([^ ][^ ]* *\)11 /<\1RK_PB3 /g s/<\([^ ][^ ]* *\)12 /<\1RK_PB4 /g s/<\([^ ][^ ]* *\)13 /<\1RK_PB5 /g s/<\([^ ][^ ]* *\)14 /<\1RK_PB6 /g s/<\([^ ][^ ]* *\)15 /<\1RK_PB7 /g s/<\([^ ][^ ]* *\)16 /<\1RK_PC0 /g s/<\([^ ][^ ]* *\)17 /<\1RK_PC1 /g s/<\([^ ][^ ]* *\)18 /<\1RK_PC2 /g s/<\([^ ][^ ]* *\)19 /<\1RK_PC3 /g s/<\([^ ][^ ]* *\)20 /<\1RK_PC4 /g s/<\([^ ][^ ]* *\)21 /<\1RK_PC5 /g s/<\([^ ][^ ]* *\)22 /<\1RK_PC6 /g s/<\([^ ][^ ]* *\)23 /<\1RK_PC7 /g s/<\([^ ][^ ]* *\)24 /<\1RK_PD0 /g s/<\([^ ][^ ]* *\)25 /<\1RK_PD1 /g s/<\([^ ][^ ]* *\)26 /<\1RK_PD2 /g s/<\([^ ][^ ]* *\)27 /<\1RK_PD3 /g s/<\([^ ][^ ]* *\)28 /<\1RK_PD4 /g s/<\([^ ][^ ]* *\)29 /<\1RK_PD5 /g s/<\([^ ][^ ]* *\)30 /<\1RK_PD6 /g s/<\([^ ][^ ]* *\)31 /<\1RK_PD7 /g s/<\([^ ][^ ]* *[^ ][^ ]* *\)0 /<\1RK_FUNC_GPIO /g s/<\([^ ][^ ]* *[^ ][^ ]* *\)RK_FUNC_\([1-9]\) /<\1\2 /g Suggested-by: Emil Renner Berthing <esmil@mailme.dk> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Acked-by: Robin Murphy <robin.murphy@arm.com>
272 lines
5.4 KiB
Plaintext
272 lines
5.4 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
/*
|
|
* Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include "rk3328.dtsi"
|
|
|
|
/ {
|
|
model = "Rockchip RK3328 EVB";
|
|
compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
|
|
|
|
chosen {
|
|
stdout-path = "serial2:1500000n8";
|
|
};
|
|
|
|
dc_12v: dc-12v {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "dc_12v";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <12000000>;
|
|
regulator-max-microvolt = <12000000>;
|
|
};
|
|
|
|
sdio_pwrseq: sdio-pwrseq {
|
|
compatible = "mmc-pwrseq-simple";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&wifi_enable_h>;
|
|
|
|
/*
|
|
* On the module itself this is one of these (depending
|
|
* on the actual card populated):
|
|
* - SDIO_RESET_L_WL_REG_ON
|
|
* - PDN (power down when low)
|
|
*/
|
|
reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
vcc_sd: sdmmc-regulator {
|
|
compatible = "regulator-fixed";
|
|
gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sdmmc0m1_gpio>;
|
|
regulator-name = "vcc_sd";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&vcc_io>;
|
|
};
|
|
|
|
vcc_sys: vcc-sys {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc_sys";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
vin-supply = <&dc_12v>;
|
|
};
|
|
|
|
vcc_phy: vcc-phy-regulator {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc_phy";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
};
|
|
};
|
|
|
|
&cpu0 {
|
|
cpu-supply = <&vdd_arm>;
|
|
};
|
|
|
|
&emmc {
|
|
bus-width = <8>;
|
|
cap-mmc-highspeed;
|
|
non-removable;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
|
|
status = "okay";
|
|
};
|
|
|
|
&gmac2phy {
|
|
phy-supply = <&vcc_phy>;
|
|
clock_in_out = "output";
|
|
assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
|
|
assigned-clock-rate = <50000000>;
|
|
assigned-clocks = <&cru SCLK_MAC2PHY>;
|
|
assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
|
|
|
|
};
|
|
|
|
&i2c1 {
|
|
status = "okay";
|
|
|
|
rk805: rk805@18 {
|
|
compatible = "rockchip,rk805";
|
|
reg = <0x18>;
|
|
interrupt-parent = <&gpio2>;
|
|
interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
|
|
#clock-cells = <1>;
|
|
clock-output-names = "xin32k", "rk805-clkout2";
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&pmic_int_l>;
|
|
rockchip,system-power-controller;
|
|
wakeup-source;
|
|
|
|
vcc1-supply = <&vcc_sys>;
|
|
vcc2-supply = <&vcc_sys>;
|
|
vcc3-supply = <&vcc_sys>;
|
|
vcc4-supply = <&vcc_sys>;
|
|
vcc5-supply = <&vcc_io>;
|
|
vcc6-supply = <&vcc_io>;
|
|
|
|
regulators {
|
|
vdd_logic: DCDC_REG1 {
|
|
regulator-name = "vdd_logic";
|
|
regulator-min-microvolt = <712500>;
|
|
regulator-max-microvolt = <1450000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1000000>;
|
|
};
|
|
};
|
|
|
|
vdd_arm: DCDC_REG2 {
|
|
regulator-name = "vdd_arm";
|
|
regulator-min-microvolt = <712500>;
|
|
regulator-max-microvolt = <1450000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <950000>;
|
|
};
|
|
};
|
|
|
|
vcc_ddr: DCDC_REG3 {
|
|
regulator-name = "vcc_ddr";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
};
|
|
};
|
|
|
|
vcc_io: DCDC_REG4 {
|
|
regulator-name = "vcc_io";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <3300000>;
|
|
};
|
|
};
|
|
|
|
vcc_18: LDO_REG1 {
|
|
regulator-name = "vcc_18";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1800000>;
|
|
};
|
|
};
|
|
|
|
vcc18_emmc: LDO_REG2 {
|
|
regulator-name = "vcc18_emmc";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1800000>;
|
|
};
|
|
};
|
|
|
|
vdd_10: LDO_REG3 {
|
|
regulator-name = "vdd_10";
|
|
regulator-min-microvolt = <1000000>;
|
|
regulator-max-microvolt = <1000000>;
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-microvolt = <1000000>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&pinctrl {
|
|
pmic {
|
|
pmic_int_l: pmic-int-l {
|
|
rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
};
|
|
};
|
|
|
|
sdio-pwrseq {
|
|
wifi_enable_h: wifi-enable-h {
|
|
rockchip,pins =
|
|
<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&sdio {
|
|
bus-width = <4>;
|
|
cap-sd-highspeed;
|
|
cap-sdio-irq;
|
|
keep-power-in-suspend;
|
|
max-frequency = <150000000>;
|
|
mmc-pwrseq = <&sdio_pwrseq>;
|
|
non-removable;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
|
|
status = "okay";
|
|
};
|
|
|
|
&sdmmc {
|
|
bus-width = <4>;
|
|
cap-mmc-highspeed;
|
|
cap-sd-highspeed;
|
|
disable-wp;
|
|
max-frequency = <150000000>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
|
|
vmmc-supply = <&vcc_sd>;
|
|
status = "okay";
|
|
};
|
|
|
|
&tsadc {
|
|
status = "okay";
|
|
};
|
|
|
|
&uart2 {
|
|
status = "okay";
|
|
};
|
|
|
|
&u2phy {
|
|
status = "okay";
|
|
};
|
|
|
|
&u2phy_host {
|
|
status = "okay";
|
|
};
|
|
|
|
&u2phy_otg {
|
|
status = "okay";
|
|
};
|
|
|
|
&usb20_otg {
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_host0_ehci {
|
|
status = "okay";
|
|
};
|
|
|
|
&usb_host0_ohci {
|
|
status = "okay";
|
|
};
|