* [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> @ 2022-11-12 14:34 ` Maya Matuszczyk 2022-11-12 17:48 ` Heiko Stübner 2022-11-12 14:34 ` [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices Maya Matuszczyk ` (3 subsequent siblings) 4 siblings, 1 reply; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-12 14:34 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel To support more devices that are clones of this device or minor revisions without duplication move most of go2's dts into a dtsi file. Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> --- .../boot/dts/rockchip/rk3326-odroid-go.dtsi | 600 +++++++++++++++++ .../boot/dts/rockchip/rk3326-odroid-go2.dts | 620 +----------------- 2 files changed, 609 insertions(+), 611 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi new file mode 100644 index 000000000000..bab99b1b4299 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi @@ -0,0 +1,600 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> + */ + +/dts-v1/; +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/pinctrl/rockchip.h> +#include "rk3326.dtsi" + +/ { + aliases { + mmc0 = &sdmmc; + }; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + power-supply = <&vcc_bl>; + pwms = <&pwm1 0 25000 0>; + }; + + builtin_gamepad: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&btn_pins>; + + button-sw1 { + gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; + label = "DPAD-UP"; + linux,code = <BTN_DPAD_UP>; + }; + button-sw2 { + gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; + label = "DPAD-DOWN"; + linux,code = <BTN_DPAD_DOWN>; + }; + button-sw3 { + gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; + label = "DPAD-LEFT"; + linux,code = <BTN_DPAD_LEFT>; + }; + button-sw4 { + gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; + label = "DPAD-RIGHT"; + linux,code = <BTN_DPAD_RIGHT>; + }; + button-sw5 { + gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; + label = "BTN-A"; + linux,code = <BTN_EAST>; + }; + button-sw6 { + gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; + label = "BTN-B"; + linux,code = <BTN_SOUTH>; + }; + button-sw7 { + gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; + label = "BTN-Y"; + linux,code = <BTN_WEST>; + }; + button-sw8 { + gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; + label = "BTN-X"; + linux,code = <BTN_NORTH>; + }; + button-sw9 { + gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; + label = "F1"; + linux,code = <BTN_TRIGGER_HAPPY1>; + }; + button-sw10 { + gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; + label = "F2"; + linux,code = <BTN_TRIGGER_HAPPY2>; + }; + button-sw11 { + gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; + label = "F3"; + linux,code = <BTN_TRIGGER_HAPPY3>; + }; + button-sw12 { + gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; + label = "F4"; + linux,code = <BTN_TRIGGER_HAPPY4>; + }; + button-sw13 { + gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; + label = "F5"; + linux,code = <BTN_TRIGGER_HAPPY5>; + }; + button-sw14 { + gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; + label = "F6"; + linux,code = <BTN_TRIGGER_HAPPY6>; + }; + button-sw15 { + gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + label = "TOP-LEFT"; + linux,code = <BTN_TL>; + }; + button-sw16 { + gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; + label = "TOP-RIGHT"; + linux,code = <BTN_TR>; + }; + }; + + leds: gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&blue_led_pin>; + + blue_led: led-0 { + label = "blue:heartbeat"; + gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + + rk817-sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "Analog"; + simple-audio-card,format = "i2s"; + simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphones", + "Speaker", "Speaker"; + simple-audio-card,routing = + "MICL", "Mic Jack", + "Headphones", "HPOL", + "Headphones", "HPOR", + "Speaker", "SPKO"; + + simple-audio-card,codec { + sound-dai = <&rk817>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s1_2ch>; + }; + }; + + vccsys: vccsys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v8_sys"; + regulator-always-on; + regulator-min-microvolt = <3800000>; + regulator-max-microvolt = <3800000>; + }; + + vcc_host: vcc_host { + compatible = "regulator-fixed"; + regulator-name = "vcc_host"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + vin-supply = <&usb_midu>; + }; +}; + +&cpu0 { + cpu-supply = <&vdd_arm>; +}; + +&cpu1 { + cpu-supply = <&vdd_arm>; +}; + +&cpu2 { + cpu-supply = <&vdd_arm>; +}; + +&cpu3 { + cpu-supply = <&vdd_arm>; +}; + +&cru { + assigned-clocks = <&cru PLL_NPLL>, + <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, + <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, + <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>, + <&cru PLL_CPLL>; + + assigned-clock-rates = <1188000000>, + <200000000>, <200000000>, + <150000000>, <150000000>, + <100000000>, <200000000>, + <17000000>; +}; + +&display_subsystem { + status = "okay"; +}; + +&dsi { + status = "okay"; + + ports { + mipi_out: port@1 { + reg = <1>; + + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; + + internal_display: panel@0 { + reg = <0>; + backlight = <&backlight>; + iovcc-supply = <&vcc_lcd>; + reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; + rotation = <270>; + vdd-supply = <&vcc_lcd>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; +}; + +&dsi_dphy { + status = "okay"; +}; + +&gpu { + mali-supply = <&vdd_logic>; + status = "okay"; +}; + +&i2c0 { + clock-frequency = <400000>; + i2c-scl-falling-time-ns = <16>; + i2c-scl-rising-time-ns = <280>; + status = "okay"; + + rk817: pmic@20 { + compatible = "rockchip,rk817"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; + clock-output-names = "rk808-clkout1", "xin32k"; + clock-names = "mclk"; + clocks = <&cru SCLK_I2S1_OUT>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; + wakeup-source; + #clock-cells = <1>; + #sound-dai-cells = <0>; + + vcc1-supply = <&vccsys>; + vcc2-supply = <&vccsys>; + vcc3-supply = <&vccsys>; + vcc4-supply = <&vccsys>; + vcc5-supply = <&vccsys>; + vcc6-supply = <&vccsys>; + vcc7-supply = <&vccsys>; + vcc8-supply = <&vccsys>; + + regulators { + vdd_logic: DCDC_REG1 { + regulator-name = "vdd_logic"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1150000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <950000>; + }; + }; + + vdd_arm: DCDC_REG2 { + regulator-name = "vdd_arm"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-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_3v3: DCDC_REG4 { + regulator-name = "vcc_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_1v8: LDO_REG2 { + regulator-name = "vcc_1v8"; + 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_1v0: LDO_REG3 { + regulator-name = "vdd_1v0"; + 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>; + }; + }; + + vcc3v3_pmu: LDO_REG4 { + regulator-name = "vcc3v3_pmu"; + 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>; + }; + }; + + vccio_sd: LDO_REG5 { + regulator-name = "vccio_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_sd: LDO_REG6 { + regulator-name = "vcc_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_bl: LDO_REG7 { + regulator-name = "vcc_bl"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_lcd: LDO_REG8 { + regulator-name = "vcc_lcd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <2800000>; + }; + }; + + LDO_REG9 { + /* unused */ + }; + + usb_midu: BOOST { + regulator-name = "usb_midu"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5400000>; + regulator-always-on; + regulator-boot-on; + }; + }; + + rk817_charger: charger { + rockchip,resistor-sense-micro-ohms = <10000>; + rockchip,sleep-enter-current-microamp = <300000>; + rockchip,sleep-filter-current-microamp = <100000>; + }; + + rk817_codec: codec { + rockchip,mic-in-differential; + }; + }; +}; + +/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */ +&i2c1 { + clock-frequency = <400000>; + status = "okay"; +}; + +/* I2S 1 Channel Used */ +&i2s1_2ch { + status = "okay"; +}; + +&io_domains { + vccio1-supply = <&vcc_3v3>; + vccio2-supply = <&vccio_sd>; + vccio3-supply = <&vcc_3v3>; + vccio4-supply = <&vcc_3v3>; + vccio5-supply = <&vcc_3v3>; + vccio6-supply = <&vcc_3v3>; + status = "okay"; +}; + +&pmu_io_domains { + pmuio1-supply = <&vcc3v3_pmu>; + pmuio2-supply = <&vcc3v3_pmu>; + status = "okay"; +}; + +&pwm1 { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcc_1v8>; + status = "okay"; +}; + +&sdmmc { + cap-sd-highspeed; + card-detect-delay = <200>; + cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + +&sfc { + pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <108000000>; + spi-rx-bus-width = <2>; + spi-tx-bus-width = <1>; + }; +}; + +&tsadc { + status = "okay"; +}; + +&u2phy { + status = "okay"; + + u2phy_host: host-port { + status = "okay"; + }; + + u2phy_otg: otg-port { + status = "disabled"; + }; +}; + +&usb20_otg { + status = "okay"; +}; + +/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_xfer &uart1_cts>; + status = "okay"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2m1_xfer>; + status = "okay"; +}; + +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&pinctrl { + btns { + btn_pins: btn-pins { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + leds { + blue_led_pin: blue-led-pin { + rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + dc_det: dc-det { + rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + pmic_int: pmic-int { + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + soc_slppin_gpio: soc_slppin_gpio { + rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; + }; + + soc_slppin_rst: soc_slppin_rst { + rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; + }; + + soc_slppin_slp: soc_slppin_slp { + rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts index 72899a714310..4702183b673c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts @@ -2,30 +2,21 @@ /* * Copyright (c) 2019 Hardkernel Co., Ltd * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> */ /dts-v1/; -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> -#include <dt-bindings/pinctrl/rockchip.h> -#include "rk3326.dtsi" +#include "rk3326-odroid-go.dtsi" / { model = "ODROID-GO Advance"; compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326"; - aliases { - mmc0 = &sdmmc; - }; - - chosen { - stdout-path = "serial2:115200n8"; - }; - - adc-joystick { + analog_sticks: adc-joystick { compatible = "adc-joystick"; io-channels = <&saradc 1>, <&saradc 2>; + poll-interval = <60>; #address-cells = <1>; #size-cells = <0>; @@ -46,12 +37,6 @@ axis@1 { }; }; - backlight: backlight { - compatible = "pwm-backlight"; - power-supply = <&vcc_bl>; - pwms = <&pwm1 0 25000 0>; - }; - battery: battery { compatible = "simple-battery"; charge-full-design-microamp-hours = <3000000>; @@ -63,606 +48,19 @@ battery: battery { voltage-min-design-microvolt = <3500000>; ocv-capacity-celsius = <20>; - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, <3574170 0>; }; - - gpio-keys { - compatible = "gpio-keys"; - pinctrl-names = "default"; - pinctrl-0 = <&btn_pins>; - - /* - * *** ODROIDGO2-Advance Switch layout *** - * |------------------------------------------------| - * | sw15 sw16 | - * |------------------------------------------------| - * | sw1 |-------------------| sw8 | - * | sw3 sw4 | | sw7 sw5 | - * | sw2 | LCD Display | sw6 | - * | | | | - * | |-------------------| | - * | sw9 sw10 sw11 sw12 sw13 sw14 | - * |------------------------------------------------| - */ - - button-sw1 { - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; - label = "DPAD-UP"; - linux,code = <BTN_DPAD_UP>; - }; - button-sw2 { - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; - label = "DPAD-DOWN"; - linux,code = <BTN_DPAD_DOWN>; - }; - button-sw3 { - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; - label = "DPAD-LEFT"; - linux,code = <BTN_DPAD_LEFT>; - }; - button-sw4 { - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; - label = "DPAD-RIGHT"; - linux,code = <BTN_DPAD_RIGHT>; - }; - button-sw5 { - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; - label = "BTN-A"; - linux,code = <BTN_EAST>; - }; - button-sw6 { - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; - label = "BTN-B"; - linux,code = <BTN_SOUTH>; - }; - button-sw7 { - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; - label = "BTN-Y"; - linux,code = <BTN_WEST>; - }; - button-sw8 { - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; - label = "BTN-X"; - linux,code = <BTN_NORTH>; - }; - button-sw9 { - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; - label = "F1"; - linux,code = <BTN_TRIGGER_HAPPY1>; - }; - button-sw10 { - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; - label = "F2"; - linux,code = <BTN_TRIGGER_HAPPY2>; - }; - button-sw11 { - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - label = "F3"; - linux,code = <BTN_TRIGGER_HAPPY3>; - }; - button-sw12 { - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; - label = "F4"; - linux,code = <BTN_TRIGGER_HAPPY4>; - }; - button-sw13 { - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; - label = "F5"; - linux,code = <BTN_TRIGGER_HAPPY5>; - }; - button-sw14 { - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; - label = "F6"; - linux,code = <BTN_TRIGGER_HAPPY6>; - }; - button-sw15 { - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; - label = "TOP-LEFT"; - linux,code = <BTN_TL>; - }; - button-sw16 { - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; - label = "TOP-RIGHT"; - linux,code = <BTN_TR>; - }; - }; - - leds: gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&blue_led_pin>; - - blue_led: led-0 { - label = "blue:heartbeat"; - gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; - }; - }; - - rk817-sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "Analog"; - simple-audio-card,format = "i2s"; - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphones", - "Speaker", "Speaker"; - simple-audio-card,routing = - "MICL", "Mic Jack", - "Headphones", "HPOL", - "Headphones", "HPOR", - "Speaker", "SPKO"; - - simple-audio-card,codec { - sound-dai = <&rk817>; - }; - - simple-audio-card,cpu { - sound-dai = <&i2s1_2ch>; - }; - }; - - vccsys: vccsys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v8_sys"; - regulator-always-on; - regulator-min-microvolt = <3800000>; - regulator-max-microvolt = <3800000>; - }; - - vcc_host: vcc_host { - compatible = "regulator-fixed"; - regulator-name = "vcc_host"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - - gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-always-on; - regulator-boot-on; - vin-supply = <&usb_midu>; - }; -}; - -&cpu0 { - cpu-supply = <&vdd_arm>; -}; - -&cpu1 { - cpu-supply = <&vdd_arm>; -}; - -&cpu2 { - cpu-supply = <&vdd_arm>; -}; - -&cpu3 { - cpu-supply = <&vdd_arm>; -}; - -&cru { - assigned-clocks = <&cru PLL_NPLL>, - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>, - <&cru PLL_CPLL>; - - assigned-clock-rates = <1188000000>, - <200000000>, <200000000>, - <150000000>, <150000000>, - <100000000>, <200000000>, - <17000000>; }; -&display_subsystem { - status = "okay"; +&internal_display { + compatible = "elida,kd35t133"; }; -&dsi { - status = "okay"; - - ports { - mipi_out: port@1 { - reg = <1>; - - mipi_out_panel: endpoint { - remote-endpoint = <&mipi_in_panel>; - }; - }; - }; - - panel@0 { - compatible = "elida,kd35t133"; - reg = <0>; - backlight = <&backlight>; - iovcc-supply = <&vcc_lcd>; - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; - rotation = <270>; - vdd-supply = <&vcc_lcd>; - - port { - mipi_in_panel: endpoint { - remote-endpoint = <&mipi_out_panel>; - }; - }; - }; -}; - -&dsi_dphy { - status = "okay"; -}; - -&gpu { - mali-supply = <&vdd_logic>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-falling-time-ns = <16>; - i2c-scl-rising-time-ns = <280>; - status = "okay"; - - rk817: pmic@20 { - compatible = "rockchip,rk817"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; - clock-output-names = "rk808-clkout1", "xin32k"; - clock-names = "mclk"; - clocks = <&cru SCLK_I2S1_OUT>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; - wakeup-source; - #clock-cells = <1>; - #sound-dai-cells = <0>; - - vcc1-supply = <&vccsys>; - vcc2-supply = <&vccsys>; - vcc3-supply = <&vccsys>; - vcc4-supply = <&vccsys>; - vcc5-supply = <&vccsys>; - vcc6-supply = <&vccsys>; - vcc7-supply = <&vccsys>; - vcc8-supply = <&vccsys>; - - regulators { - vdd_logic: DCDC_REG1 { - regulator-name = "vdd_logic"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1150000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <950000>; - }; - }; - - vdd_arm: DCDC_REG2 { - regulator-name = "vdd_arm"; - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-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_3v3: DCDC_REG4 { - regulator-name = "vcc_3v3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_1v8: LDO_REG2 { - regulator-name = "vcc_1v8"; - 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_1v0: LDO_REG3 { - regulator-name = "vdd_1v0"; - 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>; - }; - }; - - vcc3v3_pmu: LDO_REG4 { - regulator-name = "vcc3v3_pmu"; - 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>; - }; - }; - - vccio_sd: LDO_REG5 { - regulator-name = "vccio_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_sd: LDO_REG6 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-boot-on; - - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_bl: LDO_REG7 { - regulator-name = "vcc_bl"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc_lcd: LDO_REG8 { - regulator-name = "vcc_lcd"; - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <2800000>; - }; - }; - - vcc_cam: LDO_REG9 { - regulator-name = "vcc_cam"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - - regulator-state-mem { - regulator-off-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - usb_midu: BOOST { - regulator-name = "usb_midu"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5400000>; - regulator-always-on; - regulator-boot-on; - }; - }; - - rk817_charger: charger { - monitored-battery = <&battery>; - rockchip,resistor-sense-micro-ohms = <10000>; - rockchip,sleep-enter-current-microamp = <300000>; - rockchip,sleep-filter-current-microamp = <100000>; - }; - - rk817_codec: codec { - rockchip,mic-in-differential; - }; - }; -}; - -/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */ -&i2c1 { - clock-frequency = <400000>; - status = "okay"; -}; - -/* I2S 1 Channel Used */ -&i2s1_2ch { - status = "okay"; -}; - -&io_domains { - vccio1-supply = <&vcc_3v3>; - vccio2-supply = <&vccio_sd>; - vccio3-supply = <&vcc_3v3>; - vccio4-supply = <&vcc_3v3>; - vccio5-supply = <&vcc_3v3>; - vccio6-supply = <&vcc_3v3>; - status = "okay"; -}; - -&pmu_io_domains { - pmuio1-supply = <&vcc3v3_pmu>; - pmuio2-supply = <&vcc3v3_pmu>; - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcc_1v8>; - status = "okay"; -}; - -&sdmmc { - cap-sd-highspeed; - card-detect-delay = <200>; - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; - vmmc-supply = <&vcc_sd>; - vqmmc-supply = <&vccio_sd>; - status = "okay"; -}; - -&sfc { - pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; - pinctrl-names = "default"; - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <108000000>; - spi-rx-bus-width = <2>; - spi-tx-bus-width = <1>; - }; -}; - -&tsadc { - status = "okay"; -}; - -&u2phy { - status = "okay"; - - u2phy_host: host-port { - status = "okay"; - }; - - u2phy_otg: otg-port { - status = "disabled"; - }; -}; - -&usb20_otg { - status = "okay"; -}; - -/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */ -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_xfer &uart1_cts>; - status = "okay"; -}; - -&uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&uart2m1_xfer>; - status = "okay"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&pinctrl { - btns { - btn_pins: btn-pins { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - leds { - blue_led_pin: blue-led-pin { - rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - dc_det: dc-det { - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - pmic_int: pmic-int { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - soc_slppin_gpio: soc_slppin_gpio { - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; - }; - - soc_slppin_rst: soc_slppin_rst { - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; - }; - - soc_slppin_slp: soc_slppin_slp { - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; - }; - }; +&rk817_charger { + monitored-battery = <&battery>; }; -- 2.38.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI 2022-11-12 14:34 ` [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI Maya Matuszczyk @ 2022-11-12 17:48 ` Heiko Stübner 0 siblings, 0 replies; 10+ messages in thread From: Heiko Stübner @ 2022-11-12 17:48 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Maya Matuszczyk Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel Hi, Am Samstag, 12. November 2022, 15:34:07 CET schrieb Maya Matuszczyk: > To support more devices that are clones of this device or minor > revisions without duplication move most of go2's dts into a dtsi file. > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > --- > .../boot/dts/rockchip/rk3326-odroid-go.dtsi | 600 +++++++++++++++++ > .../boot/dts/rockchip/rk3326-odroid-go2.dts | 620 +----------------- shouldn't the dtsi be named after the go2? ... aka ...odroid-go2.dtsi? Also, please provide a changelog for the changes done between versions. The --cover-letter option for git format-patch provides a nice space for that. Thanks Heiko > 2 files changed, 609 insertions(+), 611 deletions(-) > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi > > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi > new file mode 100644 > index 000000000000..bab99b1b4299 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go.dtsi > @@ -0,0 +1,600 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 Hardkernel Co., Ltd > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > + */ > + > +/dts-v1/; > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/pinctrl/rockchip.h> > +#include "rk3326.dtsi" > + > +/ { > + aliases { > + mmc0 = &sdmmc; > + }; > + > + chosen { > + stdout-path = "serial2:115200n8"; > + }; > + > + backlight: backlight { > + compatible = "pwm-backlight"; > + power-supply = <&vcc_bl>; > + pwms = <&pwm1 0 25000 0>; > + }; > + > + builtin_gamepad: gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-names = "default"; > + pinctrl-0 = <&btn_pins>; > + > + button-sw1 { > + gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; > + label = "DPAD-UP"; > + linux,code = <BTN_DPAD_UP>; > + }; > + button-sw2 { > + gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; > + label = "DPAD-DOWN"; > + linux,code = <BTN_DPAD_DOWN>; > + }; > + button-sw3 { > + gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; > + label = "DPAD-LEFT"; > + linux,code = <BTN_DPAD_LEFT>; > + }; > + button-sw4 { > + gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; > + label = "DPAD-RIGHT"; > + linux,code = <BTN_DPAD_RIGHT>; > + }; > + button-sw5 { > + gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; > + label = "BTN-A"; > + linux,code = <BTN_EAST>; > + }; > + button-sw6 { > + gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; > + label = "BTN-B"; > + linux,code = <BTN_SOUTH>; > + }; > + button-sw7 { > + gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; > + label = "BTN-Y"; > + linux,code = <BTN_WEST>; > + }; > + button-sw8 { > + gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; > + label = "BTN-X"; > + linux,code = <BTN_NORTH>; > + }; > + button-sw9 { > + gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; > + label = "F1"; > + linux,code = <BTN_TRIGGER_HAPPY1>; > + }; > + button-sw10 { > + gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; > + label = "F2"; > + linux,code = <BTN_TRIGGER_HAPPY2>; > + }; > + button-sw11 { > + gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; > + label = "F3"; > + linux,code = <BTN_TRIGGER_HAPPY3>; > + }; > + button-sw12 { > + gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; > + label = "F4"; > + linux,code = <BTN_TRIGGER_HAPPY4>; > + }; > + button-sw13 { > + gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; > + label = "F5"; > + linux,code = <BTN_TRIGGER_HAPPY5>; > + }; > + button-sw14 { > + gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; > + label = "F6"; > + linux,code = <BTN_TRIGGER_HAPPY6>; > + }; > + button-sw15 { > + gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; > + label = "TOP-LEFT"; > + linux,code = <BTN_TL>; > + }; > + button-sw16 { > + gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; > + label = "TOP-RIGHT"; > + linux,code = <BTN_TR>; > + }; > + }; > + > + leds: gpio-leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&blue_led_pin>; > + > + blue_led: led-0 { > + label = "blue:heartbeat"; > + gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; > + linux,default-trigger = "heartbeat"; > + }; > + }; > + > + rk817-sound { > + compatible = "simple-audio-card"; > + simple-audio-card,name = "Analog"; > + simple-audio-card,format = "i2s"; > + simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; > + simple-audio-card,mclk-fs = <256>; > + simple-audio-card,widgets = > + "Microphone", "Mic Jack", > + "Headphone", "Headphones", > + "Speaker", "Speaker"; > + simple-audio-card,routing = > + "MICL", "Mic Jack", > + "Headphones", "HPOL", > + "Headphones", "HPOR", > + "Speaker", "SPKO"; > + > + simple-audio-card,codec { > + sound-dai = <&rk817>; > + }; > + > + simple-audio-card,cpu { > + sound-dai = <&i2s1_2ch>; > + }; > + }; > + > + vccsys: vccsys { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v8_sys"; > + regulator-always-on; > + regulator-min-microvolt = <3800000>; > + regulator-max-microvolt = <3800000>; > + }; > + > + vcc_host: vcc_host { > + compatible = "regulator-fixed"; > + regulator-name = "vcc_host"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + > + gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + regulator-always-on; > + regulator-boot-on; > + vin-supply = <&usb_midu>; > + }; > +}; > + > +&cpu0 { > + cpu-supply = <&vdd_arm>; > +}; > + > +&cpu1 { > + cpu-supply = <&vdd_arm>; > +}; > + > +&cpu2 { > + cpu-supply = <&vdd_arm>; > +}; > + > +&cpu3 { > + cpu-supply = <&vdd_arm>; > +}; > + > +&cru { > + assigned-clocks = <&cru PLL_NPLL>, > + <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, > + <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, > + <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>, > + <&cru PLL_CPLL>; > + > + assigned-clock-rates = <1188000000>, > + <200000000>, <200000000>, > + <150000000>, <150000000>, > + <100000000>, <200000000>, > + <17000000>; > +}; > + > +&display_subsystem { > + status = "okay"; > +}; > + > +&dsi { > + status = "okay"; > + > + ports { > + mipi_out: port@1 { > + reg = <1>; > + > + mipi_out_panel: endpoint { > + remote-endpoint = <&mipi_in_panel>; > + }; > + }; > + }; > + > + internal_display: panel@0 { > + reg = <0>; > + backlight = <&backlight>; > + iovcc-supply = <&vcc_lcd>; > + reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; > + rotation = <270>; > + vdd-supply = <&vcc_lcd>; > + > + port { > + mipi_in_panel: endpoint { > + remote-endpoint = <&mipi_out_panel>; > + }; > + }; > + }; > +}; > + > +&dsi_dphy { > + status = "okay"; > +}; > + > +&gpu { > + mali-supply = <&vdd_logic>; > + status = "okay"; > +}; > + > +&i2c0 { > + clock-frequency = <400000>; > + i2c-scl-falling-time-ns = <16>; > + i2c-scl-rising-time-ns = <280>; > + status = "okay"; > + > + rk817: pmic@20 { > + compatible = "rockchip,rk817"; > + reg = <0x20>; > + interrupt-parent = <&gpio0>; > + interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; > + clock-output-names = "rk808-clkout1", "xin32k"; > + clock-names = "mclk"; > + clocks = <&cru SCLK_I2S1_OUT>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; > + wakeup-source; > + #clock-cells = <1>; > + #sound-dai-cells = <0>; > + > + vcc1-supply = <&vccsys>; > + vcc2-supply = <&vccsys>; > + vcc3-supply = <&vccsys>; > + vcc4-supply = <&vccsys>; > + vcc5-supply = <&vccsys>; > + vcc6-supply = <&vccsys>; > + vcc7-supply = <&vccsys>; > + vcc8-supply = <&vccsys>; > + > + regulators { > + vdd_logic: DCDC_REG1 { > + regulator-name = "vdd_logic"; > + regulator-min-microvolt = <950000>; > + regulator-max-microvolt = <1150000>; > + regulator-ramp-delay = <6001>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + regulator-suspend-microvolt = <950000>; > + }; > + }; > + > + vdd_arm: DCDC_REG2 { > + regulator-name = "vdd_arm"; > + regulator-min-microvolt = <950000>; > + regulator-max-microvolt = <1350000>; > + regulator-ramp-delay = <6001>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-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_3v3: DCDC_REG4 { > + regulator-name = "vcc_3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + regulator-suspend-microvolt = <3300000>; > + }; > + }; > + > + vcc_1v8: LDO_REG2 { > + regulator-name = "vcc_1v8"; > + 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_1v0: LDO_REG3 { > + regulator-name = "vdd_1v0"; > + 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>; > + }; > + }; > + > + vcc3v3_pmu: LDO_REG4 { > + regulator-name = "vcc3v3_pmu"; > + 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>; > + }; > + }; > + > + vccio_sd: LDO_REG5 { > + regulator-name = "vccio_sd"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + regulator-suspend-microvolt = <3300000>; > + }; > + }; > + > + vcc_sd: LDO_REG6 { > + regulator-name = "vcc_sd"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-boot-on; > + > + regulator-state-mem { > + regulator-on-in-suspend; > + regulator-suspend-microvolt = <3300000>; > + }; > + }; > + > + vcc_bl: LDO_REG7 { > + regulator-name = "vcc_bl"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + regulator-suspend-microvolt = <3300000>; > + }; > + }; > + > + vcc_lcd: LDO_REG8 { > + regulator-name = "vcc_lcd"; > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + > + regulator-state-mem { > + regulator-off-in-suspend; > + regulator-suspend-microvolt = <2800000>; > + }; > + }; > + > + LDO_REG9 { > + /* unused */ > + }; > + > + usb_midu: BOOST { > + regulator-name = "usb_midu"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5400000>; > + regulator-always-on; > + regulator-boot-on; > + }; > + }; > + > + rk817_charger: charger { > + rockchip,resistor-sense-micro-ohms = <10000>; > + rockchip,sleep-enter-current-microamp = <300000>; > + rockchip,sleep-filter-current-microamp = <100000>; > + }; > + > + rk817_codec: codec { > + rockchip,mic-in-differential; > + }; > + }; > +}; > + > +/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */ > +&i2c1 { > + clock-frequency = <400000>; > + status = "okay"; > +}; > + > +/* I2S 1 Channel Used */ > +&i2s1_2ch { > + status = "okay"; > +}; > + > +&io_domains { > + vccio1-supply = <&vcc_3v3>; > + vccio2-supply = <&vccio_sd>; > + vccio3-supply = <&vcc_3v3>; > + vccio4-supply = <&vcc_3v3>; > + vccio5-supply = <&vcc_3v3>; > + vccio6-supply = <&vcc_3v3>; > + status = "okay"; > +}; > + > +&pmu_io_domains { > + pmuio1-supply = <&vcc3v3_pmu>; > + pmuio2-supply = <&vcc3v3_pmu>; > + status = "okay"; > +}; > + > +&pwm1 { > + status = "okay"; > +}; > + > +&saradc { > + vref-supply = <&vcc_1v8>; > + status = "okay"; > +}; > + > +&sdmmc { > + cap-sd-highspeed; > + card-detect-delay = <200>; > + cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ > + sd-uhs-sdr12; > + sd-uhs-sdr25; > + sd-uhs-sdr50; > + sd-uhs-sdr104; > + vmmc-supply = <&vcc_sd>; > + vqmmc-supply = <&vccio_sd>; > + status = "okay"; > +}; > + > +&sfc { > + pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; > + pinctrl-names = "default"; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "okay"; > + > + flash@0 { > + compatible = "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <108000000>; > + spi-rx-bus-width = <2>; > + spi-tx-bus-width = <1>; > + }; > +}; > + > +&tsadc { > + status = "okay"; > +}; > + > +&u2phy { > + status = "okay"; > + > + u2phy_host: host-port { > + status = "okay"; > + }; > + > + u2phy_otg: otg-port { > + status = "disabled"; > + }; > +}; > + > +&usb20_otg { > + status = "okay"; > +}; > + > +/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */ > +&uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_xfer &uart1_cts>; > + status = "okay"; > +}; > + > +&uart2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart2m1_xfer>; > + status = "okay"; > +}; > + > +&vopb { > + status = "okay"; > +}; > + > +&vopb_mmu { > + status = "okay"; > +}; > + > +&pinctrl { > + btns { > + btn_pins: btn-pins { > + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, > + <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, > + <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + }; > + > + headphone { > + hp_det: hp-det { > + rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; > + }; > + }; > + > + leds { > + blue_led_pin: blue-led-pin { > + rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; > + }; > + }; > + > + pmic { > + dc_det: dc-det { > + rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; > + }; > + > + pmic_int: pmic-int { > + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + > + soc_slppin_gpio: soc_slppin_gpio { > + rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; > + }; > + > + soc_slppin_rst: soc_slppin_rst { > + rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; > + }; > + > + soc_slppin_slp: soc_slppin_slp { > + rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; > + }; > + }; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts > index 72899a714310..4702183b673c 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts > @@ -2,30 +2,21 @@ > /* > * Copyright (c) 2019 Hardkernel Co., Ltd > * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > */ > > /dts-v1/; > -#include <dt-bindings/gpio/gpio.h> > -#include <dt-bindings/input/input.h> > -#include <dt-bindings/pinctrl/rockchip.h> > -#include "rk3326.dtsi" > +#include "rk3326-odroid-go.dtsi" > > / { > model = "ODROID-GO Advance"; > compatible = "hardkernel,rk3326-odroid-go2", "rockchip,rk3326"; > > - aliases { > - mmc0 = &sdmmc; > - }; > - > - chosen { > - stdout-path = "serial2:115200n8"; > - }; > - > - adc-joystick { > + analog_sticks: adc-joystick { > compatible = "adc-joystick"; > io-channels = <&saradc 1>, > <&saradc 2>; > + poll-interval = <60>; > #address-cells = <1>; > #size-cells = <0>; > > @@ -46,12 +37,6 @@ axis@1 { > }; > }; > > - backlight: backlight { > - compatible = "pwm-backlight"; > - power-supply = <&vcc_bl>; > - pwms = <&pwm1 0 25000 0>; > - }; > - > battery: battery { > compatible = "simple-battery"; > charge-full-design-microamp-hours = <3000000>; > @@ -63,606 +48,19 @@ battery: battery { > voltage-min-design-microvolt = <3500000>; > > ocv-capacity-celsius = <20>; > - ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, > <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, > <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, > <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, > <3574170 0>; > }; > - > - gpio-keys { > - compatible = "gpio-keys"; > - pinctrl-names = "default"; > - pinctrl-0 = <&btn_pins>; > - > - /* > - * *** ODROIDGO2-Advance Switch layout *** > - * |------------------------------------------------| > - * | sw15 sw16 | > - * |------------------------------------------------| > - * | sw1 |-------------------| sw8 | > - * | sw3 sw4 | | sw7 sw5 | > - * | sw2 | LCD Display | sw6 | > - * | | | | > - * | |-------------------| | > - * | sw9 sw10 sw11 sw12 sw13 sw14 | > - * |------------------------------------------------| > - */ > - > - button-sw1 { > - gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; > - label = "DPAD-UP"; > - linux,code = <BTN_DPAD_UP>; > - }; > - button-sw2 { > - gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; > - label = "DPAD-DOWN"; > - linux,code = <BTN_DPAD_DOWN>; > - }; > - button-sw3 { > - gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; > - label = "DPAD-LEFT"; > - linux,code = <BTN_DPAD_LEFT>; > - }; > - button-sw4 { > - gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; > - label = "DPAD-RIGHT"; > - linux,code = <BTN_DPAD_RIGHT>; > - }; > - button-sw5 { > - gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; > - label = "BTN-A"; > - linux,code = <BTN_EAST>; > - }; > - button-sw6 { > - gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; > - label = "BTN-B"; > - linux,code = <BTN_SOUTH>; > - }; > - button-sw7 { > - gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>; > - label = "BTN-Y"; > - linux,code = <BTN_WEST>; > - }; > - button-sw8 { > - gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; > - label = "BTN-X"; > - linux,code = <BTN_NORTH>; > - }; > - button-sw9 { > - gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; > - label = "F1"; > - linux,code = <BTN_TRIGGER_HAPPY1>; > - }; > - button-sw10 { > - gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; > - label = "F2"; > - linux,code = <BTN_TRIGGER_HAPPY2>; > - }; > - button-sw11 { > - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; > - label = "F3"; > - linux,code = <BTN_TRIGGER_HAPPY3>; > - }; > - button-sw12 { > - gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>; > - label = "F4"; > - linux,code = <BTN_TRIGGER_HAPPY4>; > - }; > - button-sw13 { > - gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>; > - label = "F5"; > - linux,code = <BTN_TRIGGER_HAPPY5>; > - }; > - button-sw14 { > - gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>; > - label = "F6"; > - linux,code = <BTN_TRIGGER_HAPPY6>; > - }; > - button-sw15 { > - gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; > - label = "TOP-LEFT"; > - linux,code = <BTN_TL>; > - }; > - button-sw16 { > - gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>; > - label = "TOP-RIGHT"; > - linux,code = <BTN_TR>; > - }; > - }; > - > - leds: gpio-leds { > - compatible = "gpio-leds"; > - pinctrl-names = "default"; > - pinctrl-0 = <&blue_led_pin>; > - > - blue_led: led-0 { > - label = "blue:heartbeat"; > - gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; > - linux,default-trigger = "heartbeat"; > - }; > - }; > - > - rk817-sound { > - compatible = "simple-audio-card"; > - simple-audio-card,name = "Analog"; > - simple-audio-card,format = "i2s"; > - simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; > - simple-audio-card,mclk-fs = <256>; > - simple-audio-card,widgets = > - "Microphone", "Mic Jack", > - "Headphone", "Headphones", > - "Speaker", "Speaker"; > - simple-audio-card,routing = > - "MICL", "Mic Jack", > - "Headphones", "HPOL", > - "Headphones", "HPOR", > - "Speaker", "SPKO"; > - > - simple-audio-card,codec { > - sound-dai = <&rk817>; > - }; > - > - simple-audio-card,cpu { > - sound-dai = <&i2s1_2ch>; > - }; > - }; > - > - vccsys: vccsys { > - compatible = "regulator-fixed"; > - regulator-name = "vcc3v8_sys"; > - regulator-always-on; > - regulator-min-microvolt = <3800000>; > - regulator-max-microvolt = <3800000>; > - }; > - > - vcc_host: vcc_host { > - compatible = "regulator-fixed"; > - regulator-name = "vcc_host"; > - regulator-min-microvolt = <5000000>; > - regulator-max-microvolt = <5000000>; > - > - gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>; > - enable-active-high; > - regulator-always-on; > - regulator-boot-on; > - vin-supply = <&usb_midu>; > - }; > -}; > - > -&cpu0 { > - cpu-supply = <&vdd_arm>; > -}; > - > -&cpu1 { > - cpu-supply = <&vdd_arm>; > -}; > - > -&cpu2 { > - cpu-supply = <&vdd_arm>; > -}; > - > -&cpu3 { > - cpu-supply = <&vdd_arm>; > -}; > - > -&cru { > - assigned-clocks = <&cru PLL_NPLL>, > - <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>, > - <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>, > - <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>, > - <&cru PLL_CPLL>; > - > - assigned-clock-rates = <1188000000>, > - <200000000>, <200000000>, > - <150000000>, <150000000>, > - <100000000>, <200000000>, > - <17000000>; > }; > > -&display_subsystem { > - status = "okay"; > +&internal_display { > + compatible = "elida,kd35t133"; > }; > > -&dsi { > - status = "okay"; > - > - ports { > - mipi_out: port@1 { > - reg = <1>; > - > - mipi_out_panel: endpoint { > - remote-endpoint = <&mipi_in_panel>; > - }; > - }; > - }; > - > - panel@0 { > - compatible = "elida,kd35t133"; > - reg = <0>; > - backlight = <&backlight>; > - iovcc-supply = <&vcc_lcd>; > - reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; > - rotation = <270>; > - vdd-supply = <&vcc_lcd>; > - > - port { > - mipi_in_panel: endpoint { > - remote-endpoint = <&mipi_out_panel>; > - }; > - }; > - }; > -}; > - > -&dsi_dphy { > - status = "okay"; > -}; > - > -&gpu { > - mali-supply = <&vdd_logic>; > - status = "okay"; > -}; > - > -&i2c0 { > - clock-frequency = <400000>; > - i2c-scl-falling-time-ns = <16>; > - i2c-scl-rising-time-ns = <280>; > - status = "okay"; > - > - rk817: pmic@20 { > - compatible = "rockchip,rk817"; > - reg = <0x20>; > - interrupt-parent = <&gpio0>; > - interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; > - clock-output-names = "rk808-clkout1", "xin32k"; > - clock-names = "mclk"; > - clocks = <&cru SCLK_I2S1_OUT>; > - pinctrl-names = "default"; > - pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; > - wakeup-source; > - #clock-cells = <1>; > - #sound-dai-cells = <0>; > - > - vcc1-supply = <&vccsys>; > - vcc2-supply = <&vccsys>; > - vcc3-supply = <&vccsys>; > - vcc4-supply = <&vccsys>; > - vcc5-supply = <&vccsys>; > - vcc6-supply = <&vccsys>; > - vcc7-supply = <&vccsys>; > - vcc8-supply = <&vccsys>; > - > - regulators { > - vdd_logic: DCDC_REG1 { > - regulator-name = "vdd_logic"; > - regulator-min-microvolt = <950000>; > - regulator-max-microvolt = <1150000>; > - regulator-ramp-delay = <6001>; > - regulator-always-on; > - regulator-boot-on; > - > - regulator-state-mem { > - regulator-on-in-suspend; > - regulator-suspend-microvolt = <950000>; > - }; > - }; > - > - vdd_arm: DCDC_REG2 { > - regulator-name = "vdd_arm"; > - regulator-min-microvolt = <950000>; > - regulator-max-microvolt = <1350000>; > - regulator-ramp-delay = <6001>; > - regulator-always-on; > - regulator-boot-on; > - > - regulator-state-mem { > - regulator-off-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_3v3: DCDC_REG4 { > - regulator-name = "vcc_3v3"; > - regulator-min-microvolt = <3300000>; > - regulator-max-microvolt = <3300000>; > - regulator-always-on; > - regulator-boot-on; > - > - regulator-state-mem { > - regulator-off-in-suspend; > - regulator-suspend-microvolt = <3300000>; > - }; > - }; > - > - vcc_1v8: LDO_REG2 { > - regulator-name = "vcc_1v8"; > - 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_1v0: LDO_REG3 { > - regulator-name = "vdd_1v0"; > - 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>; > - }; > - }; > - > - vcc3v3_pmu: LDO_REG4 { > - regulator-name = "vcc3v3_pmu"; > - 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>; > - }; > - }; > - > - vccio_sd: LDO_REG5 { > - regulator-name = "vccio_sd"; > - regulator-min-microvolt = <1800000>; > - regulator-max-microvolt = <3300000>; > - regulator-always-on; > - regulator-boot-on; > - > - regulator-state-mem { > - regulator-on-in-suspend; > - regulator-suspend-microvolt = <3300000>; > - }; > - }; > - > - vcc_sd: LDO_REG6 { > - regulator-name = "vcc_sd"; > - regulator-min-microvolt = <3300000>; > - regulator-max-microvolt = <3300000>; > - regulator-boot-on; > - > - regulator-state-mem { > - regulator-on-in-suspend; > - regulator-suspend-microvolt = <3300000>; > - }; > - }; > - > - vcc_bl: LDO_REG7 { > - regulator-name = "vcc_bl"; > - regulator-min-microvolt = <3300000>; > - regulator-max-microvolt = <3300000>; > - > - regulator-state-mem { > - regulator-off-in-suspend; > - regulator-suspend-microvolt = <3300000>; > - }; > - }; > - > - vcc_lcd: LDO_REG8 { > - regulator-name = "vcc_lcd"; > - regulator-min-microvolt = <2800000>; > - regulator-max-microvolt = <2800000>; > - > - regulator-state-mem { > - regulator-off-in-suspend; > - regulator-suspend-microvolt = <2800000>; > - }; > - }; > - > - vcc_cam: LDO_REG9 { > - regulator-name = "vcc_cam"; > - regulator-min-microvolt = <3000000>; > - regulator-max-microvolt = <3000000>; > - > - regulator-state-mem { > - regulator-off-in-suspend; > - regulator-suspend-microvolt = <3000000>; > - }; > - }; > - > - usb_midu: BOOST { > - regulator-name = "usb_midu"; > - regulator-min-microvolt = <5000000>; > - regulator-max-microvolt = <5400000>; > - regulator-always-on; > - regulator-boot-on; > - }; > - }; > - > - rk817_charger: charger { > - monitored-battery = <&battery>; > - rockchip,resistor-sense-micro-ohms = <10000>; > - rockchip,sleep-enter-current-microamp = <300000>; > - rockchip,sleep-filter-current-microamp = <100000>; > - }; > - > - rk817_codec: codec { > - rockchip,mic-in-differential; > - }; > - }; > -}; > - > -/* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */ > -&i2c1 { > - clock-frequency = <400000>; > - status = "okay"; > -}; > - > -/* I2S 1 Channel Used */ > -&i2s1_2ch { > - status = "okay"; > -}; > - > -&io_domains { > - vccio1-supply = <&vcc_3v3>; > - vccio2-supply = <&vccio_sd>; > - vccio3-supply = <&vcc_3v3>; > - vccio4-supply = <&vcc_3v3>; > - vccio5-supply = <&vcc_3v3>; > - vccio6-supply = <&vcc_3v3>; > - status = "okay"; > -}; > - > -&pmu_io_domains { > - pmuio1-supply = <&vcc3v3_pmu>; > - pmuio2-supply = <&vcc3v3_pmu>; > - status = "okay"; > -}; > - > -&pwm1 { > - status = "okay"; > -}; > - > -&saradc { > - vref-supply = <&vcc_1v8>; > - status = "okay"; > -}; > - > -&sdmmc { > - cap-sd-highspeed; > - card-detect-delay = <200>; > - cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/ > - sd-uhs-sdr12; > - sd-uhs-sdr25; > - sd-uhs-sdr50; > - sd-uhs-sdr104; > - vmmc-supply = <&vcc_sd>; > - vqmmc-supply = <&vccio_sd>; > - status = "okay"; > -}; > - > -&sfc { > - pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>; > - pinctrl-names = "default"; > - #address-cells = <1>; > - #size-cells = <0>; > - status = "okay"; > - > - flash@0 { > - compatible = "jedec,spi-nor"; > - reg = <0>; > - spi-max-frequency = <108000000>; > - spi-rx-bus-width = <2>; > - spi-tx-bus-width = <1>; > - }; > -}; > - > -&tsadc { > - status = "okay"; > -}; > - > -&u2phy { > - status = "okay"; > - > - u2phy_host: host-port { > - status = "okay"; > - }; > - > - u2phy_otg: otg-port { > - status = "disabled"; > - }; > -}; > - > -&usb20_otg { > - status = "okay"; > -}; > - > -/* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */ > -&uart1 { > - pinctrl-names = "default"; > - pinctrl-0 = <&uart1_xfer &uart1_cts>; > - status = "okay"; > -}; > - > -&uart2 { > - pinctrl-names = "default"; > - pinctrl-0 = <&uart2m1_xfer>; > - status = "okay"; > -}; > - > -&vopb { > - status = "okay"; > -}; > - > -&vopb_mmu { > - status = "okay"; > -}; > - > -&pinctrl { > - btns { > - btn_pins: btn-pins { > - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, > - <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, > - <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; > - }; > - }; > - > - headphone { > - hp_det: hp-det { > - rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>; > - }; > - }; > - > - leds { > - blue_led_pin: blue-led-pin { > - rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; > - }; > - }; > - > - pmic { > - dc_det: dc-det { > - rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; > - }; > - > - pmic_int: pmic-int { > - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; > - }; > - > - soc_slppin_gpio: soc_slppin_gpio { > - rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>; > - }; > - > - soc_slppin_rst: soc_slppin_rst { > - rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>; > - }; > - > - soc_slppin_slp: soc_slppin_slp { > - rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>; > - }; > - }; > +&rk817_charger { > + monitored-battery = <&battery>; > }; > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> 2022-11-12 14:34 ` [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI Maya Matuszczyk @ 2022-11-12 14:34 ` Maya Matuszczyk 2022-11-14 8:46 ` Krzysztof Kozlowski 2022-11-12 14:34 ` [PATCH v3 3/5] arm64: dts: rockchip: Add Odroid Go Advance Black Edition Maya Matuszczyk ` (2 subsequent siblings) 4 siblings, 1 reply; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-12 14:34 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> --- .../devicetree/bindings/arm/rockchip.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index c6c69a4e3777..d2748826cf39 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -30,6 +30,11 @@ properties: - const: amarula,vyasa-rk3288 - const: rockchip,rk3288 + - description: Anbernic RG351M + items: + - const: anbernic,rg351m + - const: rockchip,rk3326 + - description: Anbernic RG353P items: - const: anbernic,rg353p @@ -468,6 +473,16 @@ properties: - const: hardkernel,rk3326-odroid-go2 - const: rockchip,rk3326 + - description: Hardkernel Odroid Go Advance Black Edition + items: + - const: hardkernel,rk3326-odroid-go2-v11 + - const: rockchip,rk3326 + + - description: Hardkernel Odroid Go Super + items: + - const: hardkernel,rk3326-odroid-go3 + - const: rockchip,rk3326 + - description: Hugsun X99 TV Box items: - const: hugsun,x99 -- 2.38.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices 2022-11-12 14:34 ` [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices Maya Matuszczyk @ 2022-11-14 8:46 ` Krzysztof Kozlowski 0 siblings, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2022-11-14 8:46 UTC (permalink / raw) To: Maya Matuszczyk, linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, devicetree, linux-arm-kernel, linux-kernel On 12/11/2022 15:34, Maya Matuszczyk wrote: Missing commit msg, which is actually easy to write - you need to list devices you are adding. > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > --- > .../devicetree/bindings/arm/rockchip.yaml | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 3/5] arm64: dts: rockchip: Add Odroid Go Advance Black Edition [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> 2022-11-12 14:34 ` [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI Maya Matuszczyk 2022-11-12 14:34 ` [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices Maya Matuszczyk @ 2022-11-12 14:34 ` Maya Matuszczyk 2022-11-12 14:34 ` [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super Maya Matuszczyk 2022-11-12 14:34 ` [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M Maya Matuszczyk 4 siblings, 0 replies; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-12 14:34 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel This device is a minor revision of the origin Odroid Go Advance, with added two more buttons and a WiFi card Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3326-odroid-go2-v11.dts | 156 ++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 8c15593c0ca4..12446f531d29 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts new file mode 100644 index 000000000000..139c898e590e --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> + */ + +/dts-v1/; +#include "rk3326-odroid-go.dtsi" + +/ { + model = "ODROID-GO Advance Black Edition"; + compatible = "hardkernel,rk3326-odroid-go2-v11", "rockchip,rk3326"; + + aliases { + mmc1 = &sdio; + }; + + analog_sticks: adc-joystick { + compatible = "adc-joystick"; + io-channels = <&saradc 1>, + <&saradc 2>; + poll-interval = <60>; + #address-cells = <1>; + #size-cells = <0>; + + axis@0 { + reg = <0>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <172 772>; + linux,code = <ABS_X>; + }; + + axis@1 { + reg = <1>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <278 815>; + linux,code = <ABS_Y>; + }; + }; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3000000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <180000>; + voltage-max-design-microvolt = <4100000>; + voltage-min-design-microvolt = <3500000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, + <3574170 0>; + }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwrseq_pins>; + reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; + }; +}; + +&builtin_gamepad { + button-sw20 { + gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + label = "TOP-LEFT 2"; + linux,code = <BTN_TL2>; + }; + button-sw21 { + gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; + label = "TOP-RIGHT 2"; + linux,code = <BTN_TR2>; + }; +}; + +&internal_display { + compatible = "elida,kd35t133"; +}; + +&rk817 { + regulators { + vcc_wifi: LDO_REG9 { + regulator-name = "vcc_wifi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + }; +}; + +&rk817_charger { + monitored-battery = <&battery>; +}; + +&sdio { + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + disable-wp; + keep-power-in-suspend; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + vmmc-supply = <&vcc_wifi>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + esp8089: wifi@1 { + compatible = "esp,esp8089"; + reg = <1>; + }; +}; + +&pinctrl { + btns { + btn_pins: btn-pins { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + wifi { + wifi_pwrseq_pins: wifi-pwrseq-pins { + rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>; + }; + }; +}; -- 2.38.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> ` (2 preceding siblings ...) 2022-11-12 14:34 ` [PATCH v3 3/5] arm64: dts: rockchip: Add Odroid Go Advance Black Edition Maya Matuszczyk @ 2022-11-12 14:34 ` Maya Matuszczyk 2022-11-14 8:47 ` Krzysztof Kozlowski 2022-11-12 14:34 ` [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M Maya Matuszczyk 4 siblings, 1 reply; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-12 14:34 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel This device is another revision of Odroid Go Advance, with added two volume buttons, a second analog stick and a bigger screen that isn't yet supported in the Mainline Kernel. Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3326-odroid-go3.dts | 161 ++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 12446f531d29..142c83d2e5aa 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts new file mode 100644 index 000000000000..4b6c896d8abd --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> + */ + +/dts-v1/; +#include "rk3326-odroid-go.dtsi" + +/ { + model = "ODROID-GO Super"; + compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326"; + + joystick_mux_controller: mux-controller { + status = "okay"; + compatible = "gpio-mux"; + pinctrl = <&mux_en_pins>; + #mux-control-cells = <0>; + + mux-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>, + <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + }; + + joystick_mux: adc-mux { + status = "okay"; + compatible = "io-channel-mux"; + io-channels = <&saradc 1>; + io-channel-names = "parent"; + #io-channel-cells = <1>; + + mux-controls = <&joystick_mux_controller>; + + channels = "0", "1", "2", "3"; + }; + + analog_sticks: adc-joystick { + compatible = "adc-joystick"; + io-channels = <&joystick_mux 0>, + <&joystick_mux 1>, + <&joystick_mux 2>, + <&joystick_mux 3>; + poll-interval = <60>; + #address-cells = <1>; + #size-cells = <0>; + + axis@0 { + reg = <0>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <180 800>; + linux,code = <ABS_X>; + }; + + axis@1 { + reg = <1>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <180 800>; + linux,code = <ABS_RX>; + }; + axis@2 { + reg = <2>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <180 800>; + linux,code = <ABS_Y>; + }; + + axis@3 { + reg = <3>; + abs-flat = <10>; + abs-fuzz = <10>; + abs-range = <180 800>; + linux,code = <ABS_RY>; + }; + }; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <4000000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <180000>; + voltage-max-design-microvolt = <4100000>; + voltage-min-design-microvolt = <3500000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, + <3574170 0>; + }; +}; + +&builtin_gamepad { + button-sw19 { + gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; + label = "SELECT"; + linux,code = <BTN_SELECT>; + }; + /* note that TR2 and TL2 are swapped */ + button-sw20 { + gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + label = "TOP-RIGHT 2"; + linux,code = <BTN_TR2>; + }; + button-sw21 { + gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; + label = "TOP-LEFT 2"; + linux,code = <BTN_TL2>; + }; + button-sw22 { + gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; + label = "START"; + linux,code = <BTN_START>; + }; +}; + +&internal_display { + status = "disabled"; +}; + +&rk817_charger { + monitored-battery = <&battery>; +}; + +&pinctrl { + btns { + btn_pins: btn-pins { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, + <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, + <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, + <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + joystick { + mux_en_pins: mux-pins { + rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; +}; -- 2.38.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super 2022-11-12 14:34 ` [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super Maya Matuszczyk @ 2022-11-14 8:47 ` Krzysztof Kozlowski 0 siblings, 0 replies; 10+ messages in thread From: Krzysztof Kozlowski @ 2022-11-14 8:47 UTC (permalink / raw) To: Maya Matuszczyk, linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, devicetree, linux-arm-kernel, linux-kernel On 12/11/2022 15:34, Maya Matuszczyk wrote: > This device is another revision of Odroid Go Advance, with added two > volume buttons, a second analog stick and a bigger screen that isn't yet > supported in the Mainline Kernel. > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > --- > arch/arm64/boot/dts/rockchip/Makefile | 1 + > .../boot/dts/rockchip/rk3326-odroid-go3.dts | 161 ++++++++++++++++++ > 2 files changed, 162 insertions(+) > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile > index 12446f531d29..142c83d2e5aa 100644 > --- a/arch/arm64/boot/dts/rockchip/Makefile > +++ b/arch/arm64/boot/dts/rockchip/Makefile > @@ -9,6 +9,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts > new file mode 100644 > index 000000000000..4b6c896d8abd > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go3.dts > @@ -0,0 +1,161 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 Hardkernel Co., Ltd > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > + */ > + > +/dts-v1/; > +#include "rk3326-odroid-go.dtsi" > + > +/ { > + model = "ODROID-GO Super"; > + compatible = "hardkernel,rk3326-odroid-go3", "rockchip,rk3326"; > + > + joystick_mux_controller: mux-controller { > + status = "okay"; Why adding status? Also, it's not a first property... > + compatible = "gpio-mux"; > + pinctrl = <&mux_en_pins>; > + #mux-control-cells = <0>; > + > + mux-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>, > + <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; > + }; > + > + joystick_mux: adc-mux { > + status = "okay"; Why status? Is it a node override? > + compatible = "io-channel-mux"; > + io-channels = <&saradc 1>; > + io-channel-names = "parent Best regards, Krzysztof ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> ` (3 preceding siblings ...) 2022-11-12 14:34 ` [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super Maya Matuszczyk @ 2022-11-12 14:34 ` Maya Matuszczyk 2022-11-14 14:23 ` Chris Morgan 4 siblings, 1 reply; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-12 14:34 UTC (permalink / raw) To: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner Cc: João H . Spies, Chris Morgan, Maya Matuszczyk, devicetree, linux-arm-kernel, linux-kernel This device is a clone of Odroid Go Advance, with added PWM motor, internal gamepad connected on USB instead of just having it be on GPIO + ADC, and missing battery shunt resistor. There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: - It is set to red by setting output value to 1 - Set to green by setting output value to 0 - Set to yellow by setting gpio direction to input I have no idea how to describe that in DTS, without adding a custom driver, for now it's just left out. Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 142c83d2e5aa..b379516c15eb 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts new file mode 100644 index 000000000000..7f4726d4130e --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Hardkernel Co., Ltd + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> + */ + +/dts-v1/; +#include "rk3326-odroid-go.dtsi" + +/ { + model = "Anbernic RG351M"; + compatible = "anbernic,rg351m", "rockchip,rk3326"; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3450000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4200000>; + factory-internal-resistance-micro-ohms = <100000>; + voltage-max-design-microvolt = <4100000>; + voltage-min-design-microvolt = <3500000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, + <3574170 0>; + }; + + vibrator { + compatible = "pwm-vibrator"; + pwms = <&pwm0 0 1000000 0>; + pwm-names = "enable"; + }; +}; + +/delete-node/ &builtin_gamepad; +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ + +&internal_display { + compatible = "elida,kd35t133"; +}; + +&pwm0 { + status = "okay"; +}; + +&rk817_charger { + monitored-battery = <&battery>; +}; -- 2.38.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M 2022-11-12 14:34 ` [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M Maya Matuszczyk @ 2022-11-14 14:23 ` Chris Morgan 2022-11-14 19:43 ` Maya Matuszczyk 0 siblings, 1 reply; 10+ messages in thread From: Chris Morgan @ 2022-11-14 14:23 UTC (permalink / raw) To: Maya Matuszczyk Cc: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, João H . Spies, devicetree, linux-arm-kernel, linux-kernel On Sat, Nov 12, 2022 at 03:34:11PM +0100, Maya Matuszczyk wrote: > This device is a clone of Odroid Go Advance, with added PWM motor, internal > gamepad connected on USB instead of just having it be on GPIO + ADC, and > missing battery shunt resistor. I have concerns about using the rk817 battery driver with no shunt resistor. For the moment, that would result in wrong values being given for battery capacity and current. What could be done is to update the driver to only check voltage values when the shunt resistor is missing (since it's the current values and columb counter that gets affected with no resistor in place). For now though, I'd just remove the battery and charger since it's going to report the wrong data to users. > > There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: > > - It is set to red by setting output value to 1 > - Set to green by setting output value to 0 > - Set to yellow by setting gpio direction to input > > I have no idea how to describe that in DTS, without adding a custom > driver, for now it's just left out. Check out this document, it says you'd group them together under a multicolor led node: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > --- > arch/arm64/boot/dts/rockchip/Makefile | 1 + > .../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++ > 2 files changed, 55 insertions(+) > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile > index 142c83d2e5aa..b379516c15eb 100644 > --- a/arch/arm64/boot/dts/rockchip/Makefile > +++ b/arch/arm64/boot/dts/rockchip/Makefile > @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > new file mode 100644 > index 000000000000..7f4726d4130e > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > @@ -0,0 +1,54 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 Hardkernel Co., Ltd > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > + */ > + > +/dts-v1/; > +#include "rk3326-odroid-go.dtsi" > + > +/ { > + model = "Anbernic RG351M"; > + compatible = "anbernic,rg351m", "rockchip,rk3326"; > + > + battery: battery { > + compatible = "simple-battery"; > + charge-full-design-microamp-hours = <3450000>; > + charge-term-current-microamp = <300000>; > + constant-charge-current-max-microamp = <2000000>; > + constant-charge-voltage-max-microvolt = <4200000>; > + factory-internal-resistance-micro-ohms = <100000>; > + voltage-max-design-microvolt = <4100000>; > + voltage-min-design-microvolt = <3500000>; > + > + ocv-capacity-celsius = <20>; > + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, > + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, > + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, > + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, > + <3574170 0>; > + }; > + > + vibrator { > + compatible = "pwm-vibrator"; > + pwms = <&pwm0 0 1000000 0>; > + pwm-names = "enable"; > + }; > +}; > + > +/delete-node/ &builtin_gamepad; > +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ > + > +&internal_display { > + compatible = "elida,kd35t133"; > +}; > + > +&pwm0 { > + status = "okay"; > +}; > + > +&rk817_charger { > + monitored-battery = <&battery>; > +}; > -- > 2.38.1 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M 2022-11-14 14:23 ` Chris Morgan @ 2022-11-14 19:43 ` Maya Matuszczyk 0 siblings, 0 replies; 10+ messages in thread From: Maya Matuszczyk @ 2022-11-14 19:43 UTC (permalink / raw) To: Chris Morgan Cc: linux-rockchip, Rob Herring, Krzysztof Kozlowski, Heiko Stuebner, João H . Spies, devicetree, linux-arm-kernel, linux-kernel pon., 14 lis 2022 o 15:23 Chris Morgan <macroalpha82@gmail.com> napisał(a): > > On Sat, Nov 12, 2022 at 03:34:11PM +0100, Maya Matuszczyk wrote: > > This device is a clone of Odroid Go Advance, with added PWM motor, internal > > gamepad connected on USB instead of just having it be on GPIO + ADC, and > > missing battery shunt resistor. > > I have concerns about using the rk817 battery driver with no shunt > resistor. For the moment, that would result in wrong values being > given for battery capacity and current. What could be done is to > update the driver to only check voltage values when the shunt > resistor is missing (since it's the current values and columb counter > that gets affected with no resistor in place). For now though, I'd > just remove the battery and charger since it's going to report the > wrong data to users. I guess that's fair... the device literally has no shunt resistor and DT should reflect hardware. > > > > > There's also an LED on GPIO 77(I *guess* PB5 on &gpio2), that is controlled in a weird way: > > > > - It is set to red by setting output value to 1 > > - Set to green by setting output value to 0 > > - Set to yellow by setting gpio direction to input > > > > I have no idea how to describe that in DTS, without adding a custom > > driver, for now it's just left out. > > Check out this document, it says you'd group them together under a > multicolor led node: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml As far as I know there is no support to controlling LED in a way that this device requires the LED to be controlled. It's just one GPIO, and setting it to outputting 0, outputting 1 or to input changes the color and there's no way to turn it off. Best Regards, Maya Matuszczyk > > > > > Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> > > --- > > arch/arm64/boot/dts/rockchip/Makefile | 1 + > > .../dts/rockchip/rk3326-anbernic-rg351m.dts | 54 +++++++++++++++++++ > > 2 files changed, 55 insertions(+) > > create mode 100644 arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > > > diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile > > index 142c83d2e5aa..b379516c15eb 100644 > > --- a/arch/arm64/boot/dts/rockchip/Makefile > > +++ b/arch/arm64/boot/dts/rockchip/Makefile > > @@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-evb.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-roc-cc.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3308-rock-pi-s.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a95x-z2.dtb > > +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-anbernic-rg351m.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb > > dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb > > diff --git a/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > new file mode 100644 > > index 000000000000..7f4726d4130e > > --- /dev/null > > +++ b/arch/arm64/boot/dts/rockchip/rk3326-anbernic-rg351m.dts > > @@ -0,0 +1,54 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +/* > > + * Copyright (c) 2019 Hardkernel Co., Ltd > > + * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH > > + * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com> > > + */ > > + > > +/dts-v1/; > > +#include "rk3326-odroid-go.dtsi" > > + > > +/ { > > + model = "Anbernic RG351M"; > > + compatible = "anbernic,rg351m", "rockchip,rk3326"; > > + > > + battery: battery { > > + compatible = "simple-battery"; > > + charge-full-design-microamp-hours = <3450000>; > > + charge-term-current-microamp = <300000>; > > + constant-charge-current-max-microamp = <2000000>; > > + constant-charge-voltage-max-microvolt = <4200000>; > > + factory-internal-resistance-micro-ohms = <100000>; > > + voltage-max-design-microvolt = <4100000>; > > + voltage-min-design-microvolt = <3500000>; > > + > > + ocv-capacity-celsius = <20>; > > + ocv-capacity-table-0 = <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>, > > + <3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>, > > + <3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>, > > + <3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>, > > + <3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>, > > + <3574170 0>; > > + }; > > + > > + vibrator { > > + compatible = "pwm-vibrator"; > > + pwms = <&pwm0 0 1000000 0>; > > + pwm-names = "enable"; > > + }; > > +}; > > + > > +/delete-node/ &builtin_gamepad; > > +/delete-node/ &vcc_host; /* conflicts with pwm vibration motor */ > > + > > +&internal_display { > > + compatible = "elida,kd35t133"; > > +}; > > + > > +&pwm0 { > > + status = "okay"; > > +}; > > + > > +&rk817_charger { > > + monitored-battery = <&battery>; > > +}; > > -- > > 2.38.1 > > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-11-14 19:44 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20221112143411.517906-1-maccraft123mc@gmail.com> 2022-11-12 14:34 ` [PATCH v3 1/5] arm64: dts: rockchip: Move most of Odroid Go Advance DTS into a DTSI Maya Matuszczyk 2022-11-12 17:48 ` Heiko Stübner 2022-11-12 14:34 ` [PATCH v3 2/5] dt-bindings: arm: rockchip: Add more RK3326 devices Maya Matuszczyk 2022-11-14 8:46 ` Krzysztof Kozlowski 2022-11-12 14:34 ` [PATCH v3 3/5] arm64: dts: rockchip: Add Odroid Go Advance Black Edition Maya Matuszczyk 2022-11-12 14:34 ` [PATCH v3 4/5] arm64: dts: rockchip: Add Odroid Go Super Maya Matuszczyk 2022-11-14 8:47 ` Krzysztof Kozlowski 2022-11-12 14:34 ` [PATCH v3 5/5] arm64: dts: rockchip: Add Anbernic RG351M Maya Matuszczyk 2022-11-14 14:23 ` Chris Morgan 2022-11-14 19:43 ` Maya Matuszczyk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).