* [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus @ 2024-03-14 15:53 Denis Burkov 2024-03-14 15:53 ` [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support Denis Burkov 2024-03-15 17:34 ` [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Rob Herring 0 siblings, 2 replies; 8+ messages in thread From: Denis Burkov @ 2024-03-14 15:53 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel Cc: Denis Burkov Add a new board name. Signed-off-by: Denis Burkov <hitechshell@mail.ru> --- Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml index 09d835db6db5..43491e7f8a5e 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.yaml +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml @@ -774,6 +774,11 @@ properties: - const: pocketbook,touch-lux-3 - const: allwinner,sun5i-a13 + - description: PocketBook 614 Plus + items: + - const: pocketbook,614-plus + - const: allwinner,sun5i-a13 + - description: Point of View Protab2-IPS9 items: - const: pov,protab2-ips9 -- 2.43.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-14 15:53 [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Denis Burkov @ 2024-03-14 15:53 ` Denis Burkov 2024-03-14 17:14 ` Jernej Škrabec 2024-03-15 17:34 ` [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Rob Herring 1 sibling, 1 reply; 8+ messages in thread From: Denis Burkov @ 2024-03-14 15:53 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel Cc: Denis Burkov What works: - Serial console - mmc0, mmc2 (both microSD card slots on the board) - All buttons (gpio and lradc based) - Power LED - PMIC - RTC - USB OTG/gadgets mode Signed-off-by: Denis Burkov <hitechshell@mail.ru> --- arch/arm/boot/dts/allwinner/Makefile | 2 + .../sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++ 2 files changed, 256 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile index 2d26c3397f14..fe321865beed 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a13-olinuxino.dtb \ sun5i-a13-olinuxino-micro.dtb \ sun5i-a13-pocketbook-touch-lux-3.dtb \ + sun5i-a13-pocketbook-614-plus.dtb \ sun5i-a13-q8-tablet.dtb \ sun5i-a13-utoo-p66.dtb \ sun5i-gr8-chip-pro.dtb \ @@ -82,6 +83,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a13-olinuxino.dtb \ sun5i-a13-olinuxino-micro.dtb \ sun5i-a13-pocketbook-touch-lux-3.dtb \ + sun5i-a13-pocketbook-614-plus.dtb \ sun5i-a13-q8-tablet.dtb \ sun5i-a13-utoo-p66.dtb \ sun5i-gr8-chip-pro.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts new file mode 100644 index 000000000000..89898fa16ff7 --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts @@ -0,0 +1,254 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> + */ + +/dts-v1/; +#include "sun5i-a13.dtsi" +#include "sunxi-common-regulators.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "PocketBook 614 Plus"; + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; + + aliases { + serial0 = &uart1; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + rtc0 = &pcf8563; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_pocketbook>; + + led { + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ + default-state = "on"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + label = "GPIO Keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pocketbook_btn_pins>; + + key-right { + label = "Right"; + linux,code = <KEY_NEXT>; + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ + }; + + key-left { + label = "Left"; + linux,code = <KEY_PREVIOUS>; + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ + }; + }; + + reg_3v3_mmc0: regulator-mmc0 { + compatible = "regulator-fixed"; + regulator-name = "vdd-mmc0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-names = "default"; + pinctrl-0 = <&pocketbook_reg_mmc0_pins>; + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&ehci0 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + }; +}; + +#include "axp209.dtsi" + +&i2c1 { + status = "okay"; + + pcf8563: rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + +&i2c2 { + status = "okay"; + + /* Touchpanel is connected here. */ +}; + +&lradc { + vref-supply = <®_ldo2>; + status = "okay"; + + button-300 { + label = "Down"; + linux,code = <KEY_DOWN>; + channel = <0>; + voltage = <300000>; + }; + + button-700 { + label = "Up"; + linux,code = <KEY_UP>; + channel = <0>; + voltage = <700000>; + }; + + button-1000 { + label = "Left"; + linux,code = <KEY_LEFT>; + channel = <0>; + voltage = <1000000>; + }; + + button-1200 { + label = "Menu"; + linux,code = <KEY_MENU>; + channel = <0>; + voltage = <1200000>; + }; + + button-1500 { + label = "Right"; + linux,code = <KEY_RIGHT>; + channel = <0>; + voltage = <1500000>; + }; +}; + +&mmc0 { + vmmc-supply = <®_3v3_mmc0>; + bus-width = <4>; + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_4bit_pc_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&otg_sram { + status = "okay"; +}; + +&pio { + led_pins_pocketbook: led-pin { + pins = "PE8"; + function = "gpio_out"; + }; + pocketbook_btn_pins: btn-pins { + pins = "PG9", "PG10"; + function = "gpio_in"; + bias-pull-up; + }; + pocketbook_reg_mmc0_pins: reg-mmc0-pins { + pins = "PE4"; + function = "gpio_out"; + }; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_ldo3 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-wifi"; +}; + +®_usb0_vbus { + status = "okay"; + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +}; + +®_usb1_vbus { + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pg_pins>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */ + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +}; -- 2.43.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-14 15:53 ` [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support Denis Burkov @ 2024-03-14 17:14 ` Jernej Škrabec 2024-03-14 18:18 ` hitechshell 0 siblings, 1 reply; 8+ messages in thread From: Jernej Škrabec @ 2024-03-14 17:14 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, Denis Burkov Cc: Denis Burkov Hi Denis! Dne četrtek, 14. marec 2024 ob 16:53:06 CET je Denis Burkov napisal(a): > What works: > > - Serial console > - mmc0, mmc2 (both microSD card slots on the board) > - All buttons (gpio and lradc based) > - Power LED > - PMIC > - RTC > - USB OTG/gadgets mode > > Signed-off-by: Denis Burkov <hitechshell@mail.ru> > --- > arch/arm/boot/dts/allwinner/Makefile | 2 + > .../sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++ > 2 files changed, 256 insertions(+) > create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile > index 2d26c3397f14..fe321865beed 100644 > --- a/arch/arm/boot/dts/allwinner/Makefile > +++ b/arch/arm/boot/dts/allwinner/Makefile > @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > sun5i-a13-olinuxino.dtb \ > sun5i-a13-olinuxino-micro.dtb \ > sun5i-a13-pocketbook-touch-lux-3.dtb \ > + sun5i-a13-pocketbook-614-plus.dtb \ > sun5i-a13-q8-tablet.dtb \ > sun5i-a13-utoo-p66.dtb \ > sun5i-gr8-chip-pro.dtb \ > @@ -82,6 +83,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > sun5i-a13-olinuxino.dtb \ > sun5i-a13-olinuxino-micro.dtb \ > sun5i-a13-pocketbook-touch-lux-3.dtb \ > + sun5i-a13-pocketbook-614-plus.dtb \ > sun5i-a13-q8-tablet.dtb \ > sun5i-a13-utoo-p66.dtb \ > sun5i-gr8-chip-pro.dtb \ This merge artefact. Can you add patch before this one and remove duplicate definitions? > diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > new file mode 100644 > index 000000000000..89898fa16ff7 > --- /dev/null > +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > @@ -0,0 +1,254 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> > + */ > + > +/dts-v1/; > +#include "sun5i-a13.dtsi" > +#include "sunxi-common-regulators.dtsi" Extra empty line here. > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > + > +/ { > + model = "PocketBook 614 Plus"; > + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; > + > + aliases { > + serial0 = &uart1; > + i2c0 = &i2c0; > + i2c1 = &i2c1; > + i2c2 = &i2c2; > + rtc0 = &pcf8563; Please drop aliases except serial0. > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&led_pins_pocketbook>; Drop pinctrl nodes. GPIOs don't need them. > + > + led { > + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ > + default-state = "on"; Add additional properties, like function and color. > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + autorepeat; Why is autorepeat needed? > + label = "GPIO Keys"; I guess label is self evident and not needed? > + pinctrl-names = "default"; > + pinctrl-0 = <&pocketbook_btn_pins>; Again, GPIOs don't need pinctrl nodes. I know that you specified pull up, but please try without. Other boards have same design and it's not needed. > + > + key-right { > + label = "Right"; > + linux,code = <KEY_NEXT>; > + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ > + }; > + > + key-left { > + label = "Left"; > + linux,code = <KEY_PREVIOUS>; > + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ > + }; > + }; > + > + reg_3v3_mmc0: regulator-mmc0 { > + compatible = "regulator-fixed"; > + regulator-name = "vdd-mmc0"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pocketbook_reg_mmc0_pins>; again, pinctrl not needed. > + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ > + vin-supply = <®_vcc3v3>; > + }; > +}; > + > +&cpu0 { > + cpu-supply = <®_dcdc2>; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&i2c0 { > + status = "okay"; > + > + axp209: pmic@34 { > + compatible = "x-powers,axp209"; > + reg = <0x34>; > + interrupts = <0>; > + }; > +}; > + > +#include "axp209.dtsi" > + > +&i2c1 { > + status = "okay"; > + > + pcf8563: rtc@51 { > + compatible = "nxp,pcf8563"; > + reg = <0x51>; > + #clock-cells = <0>; > + }; > +}; > + > +&i2c2 { > + status = "okay"; > + > + /* Touchpanel is connected here. */ Any reason why don't you specify touch panel device here? > +}; > + > +&lradc { > + vref-supply = <®_ldo2>; > + status = "okay"; > + > + button-300 { > + label = "Down"; > + linux,code = <KEY_DOWN>; > + channel = <0>; > + voltage = <300000>; > + }; > + > + button-700 { > + label = "Up"; > + linux,code = <KEY_UP>; > + channel = <0>; > + voltage = <700000>; > + }; > + > + button-1000 { > + label = "Left"; > + linux,code = <KEY_LEFT>; > + channel = <0>; > + voltage = <1000000>; > + }; > + > + button-1200 { > + label = "Menu"; > + linux,code = <KEY_MENU>; > + channel = <0>; > + voltage = <1200000>; > + }; > + > + button-1500 { > + label = "Right"; > + linux,code = <KEY_RIGHT>; > + channel = <0>; > + voltage = <1500000>; > + }; > +}; > + > +&mmc0 { > + vmmc-supply = <®_3v3_mmc0>; > + bus-width = <4>; > + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ > + status = "okay"; > +}; > + > +&mmc2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc2_4bit_pc_pins>; > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + non-removable; > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; > + > +&otg_sram { > + status = "okay"; > +}; > + > +&pio { > + led_pins_pocketbook: led-pin { > + pins = "PE8"; > + function = "gpio_out"; > + }; > + pocketbook_btn_pins: btn-pins { > + pins = "PG9", "PG10"; > + function = "gpio_in"; > + bias-pull-up; > + }; > + pocketbook_reg_mmc0_pins: reg-mmc0-pins { > + pins = "PE4"; > + function = "gpio_out"; > + }; > +}; Whole PIO node can be dropped. Best regards, Jernej > + > +®_dcdc2 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1500000>; > + regulator-name = "vdd-cpu"; > +}; > + > +®_dcdc3 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1400000>; > + regulator-name = "vdd-int-dll"; > +}; > + > +®_ldo1 { > + regulator-name = "vdd-rtc"; > +}; > + > +®_ldo2 { > + regulator-always-on; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-name = "avcc"; > +}; > + > +®_ldo3 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-name = "vcc-wifi"; > +}; > + > +®_usb0_vbus { > + status = "okay"; > + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ > +}; > + > +®_usb1_vbus { > + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ > + status = "okay"; > +}; > + > +&uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_pg_pins>; > + status = "okay"; > +}; > + > +&usb_otg { > + dr_mode = "otg"; > + status = "okay"; > +}; > + > +&usb_power_supply { > + status = "okay"; > +}; > + > +&battery_power_supply { > + status = "okay"; > +}; > + > +&usbphy { > + usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */ > + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; > + usb0_vbus-supply = <®_usb0_vbus>; > + usb1_vbus-supply = <®_usb1_vbus>; > + status = "okay"; > +}; > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-14 17:14 ` Jernej Škrabec @ 2024-03-14 18:18 ` hitechshell 2024-03-14 19:18 ` Jernej Škrabec 0 siblings, 1 reply; 8+ messages in thread From: hitechshell @ 2024-03-14 18:18 UTC (permalink / raw) To: Jernej Škrabec Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Thu, Mar 14, 2024 at 06:14:48PM +0100, Jernej Škrabec wrote: > Hi Denis! > > Dne četrtek, 14. marec 2024 ob 16:53:06 CET je Denis Burkov napisal(a): > > What works: > > > > - Serial console > > - mmc0, mmc2 (both microSD card slots on the board) > > - All buttons (gpio and lradc based) > > - Power LED > > - PMIC > > - RTC > > - USB OTG/gadgets mode > > > > Signed-off-by: Denis Burkov <hitechshell@mail.ru> > > --- > > arch/arm/boot/dts/allwinner/Makefile | 2 + > > .../sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++ > > 2 files changed, 256 insertions(+) > > create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > > > diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile > > index 2d26c3397f14..fe321865beed 100644 > > --- a/arch/arm/boot/dts/allwinner/Makefile > > +++ b/arch/arm/boot/dts/allwinner/Makefile > > @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > > sun5i-a13-olinuxino.dtb \ > > sun5i-a13-olinuxino-micro.dtb \ > > sun5i-a13-pocketbook-touch-lux-3.dtb \ > > + sun5i-a13-pocketbook-614-plus.dtb \ > > sun5i-a13-q8-tablet.dtb \ > > sun5i-a13-utoo-p66.dtb \ > > sun5i-gr8-chip-pro.dtb \ > > @@ -82,6 +83,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > > sun5i-a13-olinuxino.dtb \ > > sun5i-a13-olinuxino-micro.dtb \ > > sun5i-a13-pocketbook-touch-lux-3.dtb \ > > + sun5i-a13-pocketbook-614-plus.dtb \ > > sun5i-a13-q8-tablet.dtb \ > > sun5i-a13-utoo-p66.dtb \ > > sun5i-gr8-chip-pro.dtb \ > > This merge artefact. Can you add patch before this one and remove duplicate definitions? > Sorry, I didn't quite understand. Should I remove the duplicate block in a separate commit? or enable this one? > > diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > new file mode 100644 > > index 000000000000..89898fa16ff7 > > --- /dev/null > > +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > @@ -0,0 +1,254 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> > > + */ > > + > > +/dts-v1/; > > +#include "sun5i-a13.dtsi" > > +#include "sunxi-common-regulators.dtsi" > > Extra empty line here. > > > +#include <dt-bindings/gpio/gpio.h> > > +#include <dt-bindings/input/input.h> > > +#include <dt-bindings/interrupt-controller/irq.h> > > + > > +/ { > > + model = "PocketBook 614 Plus"; > > + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; > > + > > + aliases { > > + serial0 = &uart1; > > + i2c0 = &i2c0; > > + i2c1 = &i2c1; > > + i2c2 = &i2c2; > > + rtc0 = &pcf8563; > > Please drop aliases except serial0. > > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > + > > + leds { > > + compatible = "gpio-leds"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&led_pins_pocketbook>; > > Drop pinctrl nodes. GPIOs don't need them. > > > + > > + led { > > + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ > > + default-state = "on"; > > Add additional properties, like function and color. > > > + }; > > + }; > > + > > + gpio-keys { > > + compatible = "gpio-keys"; > > + autorepeat; > > Why is autorepeat needed? > > > + label = "GPIO Keys"; > > I guess label is self evident and not needed? > > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pocketbook_btn_pins>; > > Again, GPIOs don't need pinctrl nodes. I know that you specified pull up, but > please try without. Other boards have same design and it's not needed. > > > + > > + key-right { > > + label = "Right"; > > + linux,code = <KEY_NEXT>; > > + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ > > + }; > > + > > + key-left { > > + label = "Left"; > > + linux,code = <KEY_PREVIOUS>; > > + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ > > + }; > > + }; > > + > > + reg_3v3_mmc0: regulator-mmc0 { > > + compatible = "regulator-fixed"; > > + regulator-name = "vdd-mmc0"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pocketbook_reg_mmc0_pins>; > > again, pinctrl not needed. > > > + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ > > + vin-supply = <®_vcc3v3>; > > + }; > > +}; > > + > > +&cpu0 { > > + cpu-supply = <®_dcdc2>; > > +}; > > + > > +&ehci0 { > > + status = "okay"; > > +}; > > + > > +&i2c0 { > > + status = "okay"; > > + > > + axp209: pmic@34 { > > + compatible = "x-powers,axp209"; > > + reg = <0x34>; > > + interrupts = <0>; > > + }; > > +}; > > + > > +#include "axp209.dtsi" > > + > > +&i2c1 { > > + status = "okay"; > > + > > + pcf8563: rtc@51 { > > + compatible = "nxp,pcf8563"; > > + reg = <0x51>; > > + #clock-cells = <0>; > > + }; > > +}; > > + > > +&i2c2 { > > + status = "okay"; > > + > > + /* Touchpanel is connected here. */ > > Any reason why don't you specify touch panel device here? > My mistake, I copied this node from another device. This device does not have a touchpanel at all. > > +}; > > + > > +&lradc { > > + vref-supply = <®_ldo2>; > > + status = "okay"; > > + > > + button-300 { > > + label = "Down"; > > + linux,code = <KEY_DOWN>; > > + channel = <0>; > > + voltage = <300000>; > > + }; > > + > > + button-700 { > > + label = "Up"; > > + linux,code = <KEY_UP>; > > + channel = <0>; > > + voltage = <700000>; > > + }; > > + > > + button-1000 { > > + label = "Left"; > > + linux,code = <KEY_LEFT>; > > + channel = <0>; > > + voltage = <1000000>; > > + }; > > + > > + button-1200 { > > + label = "Menu"; > > + linux,code = <KEY_MENU>; > > + channel = <0>; > > + voltage = <1200000>; > > + }; > > + > > + button-1500 { > > + label = "Right"; > > + linux,code = <KEY_RIGHT>; > > + channel = <0>; > > + voltage = <1500000>; > > + }; > > +}; > > + > > +&mmc0 { > > + vmmc-supply = <®_3v3_mmc0>; > > + bus-width = <4>; > > + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ > > + status = "okay"; > > +}; > > + > > +&mmc2 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&mmc2_4bit_pc_pins>; > > + vmmc-supply = <®_vcc3v3>; > > + bus-width = <4>; > > + non-removable; > > + status = "okay"; > > +}; > > + > > +&ohci0 { > > + status = "okay"; > > +}; > > + > > +&otg_sram { > > + status = "okay"; > > +}; > > + > > +&pio { > > + led_pins_pocketbook: led-pin { > > + pins = "PE8"; > > + function = "gpio_out"; > > + }; > > + pocketbook_btn_pins: btn-pins { > > + pins = "PG9", "PG10"; > > + function = "gpio_in"; > > + bias-pull-up; > > + }; > > + pocketbook_reg_mmc0_pins: reg-mmc0-pins { > > + pins = "PE4"; > > + function = "gpio_out"; > > + }; > > +}; > > Whole PIO node can be dropped. > > Best regards, > Jernej > > > + > > +®_dcdc2 { > > + regulator-always-on; > > + regulator-min-microvolt = <1000000>; > > + regulator-max-microvolt = <1500000>; > > + regulator-name = "vdd-cpu"; > > +}; > > + > > +®_dcdc3 { > > + regulator-always-on; > > + regulator-min-microvolt = <1000000>; > > + regulator-max-microvolt = <1400000>; > > + regulator-name = "vdd-int-dll"; > > +}; > > + > > +®_ldo1 { > > + regulator-name = "vdd-rtc"; > > +}; > > + > > +®_ldo2 { > > + regulator-always-on; > > + regulator-min-microvolt = <3000000>; > > + regulator-max-microvolt = <3000000>; > > + regulator-name = "avcc"; > > +}; > > + > > +®_ldo3 { > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + regulator-name = "vcc-wifi"; > > +}; > > + > > +®_usb0_vbus { > > + status = "okay"; > > + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ > > +}; > > + > > +®_usb1_vbus { > > + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ > > + status = "okay"; > > +}; > > + > > +&uart1 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&uart1_pg_pins>; > > + status = "okay"; > > +}; > > + > > +&usb_otg { > > + dr_mode = "otg"; > > + status = "okay"; > > +}; > > + > > +&usb_power_supply { > > + status = "okay"; > > +}; > > + > > +&battery_power_supply { > > + status = "okay"; > > +}; > > + > > +&usbphy { > > + usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */ > > + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; > > + usb0_vbus-supply = <®_usb0_vbus>; > > + usb1_vbus-supply = <®_usb1_vbus>; > > + status = "okay"; > > +}; > > > > > > Yes, everything works without pincrtl. One guy told me that I need to specify pinctrl for each pin used. Thanks for the review. Best regards, Denis ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-14 18:18 ` hitechshell @ 2024-03-14 19:18 ` Jernej Škrabec 2024-03-16 14:39 ` [PATCH v2] " Denis Burkov 0 siblings, 1 reply; 8+ messages in thread From: Jernej Škrabec @ 2024-03-14 19:18 UTC (permalink / raw) To: hitechshell Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel Dne četrtek, 14. marec 2024 ob 19:18:58 CET je hitechshell@mail.ru napisal(a): > On Thu, Mar 14, 2024 at 06:14:48PM +0100, Jernej Škrabec wrote: > > Hi Denis! > > > > Dne četrtek, 14. marec 2024 ob 16:53:06 CET je Denis Burkov napisal(a): > > > What works: > > > > > > - Serial console > > > - mmc0, mmc2 (both microSD card slots on the board) > > > - All buttons (gpio and lradc based) > > > - Power LED > > > - PMIC > > > - RTC > > > - USB OTG/gadgets mode > > > > > > Signed-off-by: Denis Burkov <hitechshell@mail.ru> > > > --- > > > arch/arm/boot/dts/allwinner/Makefile | 2 + > > > .../sun5i-a13-pocketbook-614-plus.dts | 254 ++++++++++++++++++ > > > 2 files changed, 256 insertions(+) > > > create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > > > > > diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile > > > index 2d26c3397f14..fe321865beed 100644 > > > --- a/arch/arm/boot/dts/allwinner/Makefile > > > +++ b/arch/arm/boot/dts/allwinner/Makefile > > > @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > > > sun5i-a13-olinuxino.dtb \ > > > sun5i-a13-olinuxino-micro.dtb \ > > > sun5i-a13-pocketbook-touch-lux-3.dtb \ > > > + sun5i-a13-pocketbook-614-plus.dtb \ > > > sun5i-a13-q8-tablet.dtb \ > > > sun5i-a13-utoo-p66.dtb \ > > > sun5i-gr8-chip-pro.dtb \ > > > @@ -82,6 +83,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > > > sun5i-a13-olinuxino.dtb \ > > > sun5i-a13-olinuxino-micro.dtb \ > > > sun5i-a13-pocketbook-touch-lux-3.dtb \ > > > + sun5i-a13-pocketbook-614-plus.dtb \ > > > sun5i-a13-q8-tablet.dtb \ > > > sun5i-a13-utoo-p66.dtb \ > > > sun5i-gr8-chip-pro.dtb \ > > > > This merge artefact. Can you add patch before this one and remove duplicate definitions? > > > Sorry, I didn't quite understand. Should I remove the duplicate block in a separate commit? or enable this one? Yes, remove block in a separate patch, which should be positioned before this one. > > > diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > > new file mode 100644 > > > index 000000000000..89898fa16ff7 > > > --- /dev/null > > > +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > > @@ -0,0 +1,254 @@ > > > +// SPDX-License-Identifier: GPL-2.0+ > > > +/* > > > + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> > > > + */ > > > + > > > +/dts-v1/; > > > +#include "sun5i-a13.dtsi" > > > +#include "sunxi-common-regulators.dtsi" > > > > Extra empty line here. > > > > > +#include <dt-bindings/gpio/gpio.h> > > > +#include <dt-bindings/input/input.h> > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > + > > > +/ { > > > + model = "PocketBook 614 Plus"; > > > + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; > > > + > > > + aliases { > > > + serial0 = &uart1; > > > + i2c0 = &i2c0; > > > + i2c1 = &i2c1; > > > + i2c2 = &i2c2; > > > + rtc0 = &pcf8563; > > > > Please drop aliases except serial0. > > > > > + }; > > > + > > > + chosen { > > > + stdout-path = "serial0:115200n8"; > > > + }; > > > + > > > + leds { > > > + compatible = "gpio-leds"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&led_pins_pocketbook>; > > > > Drop pinctrl nodes. GPIOs don't need them. > > > > > + > > > + led { > > > + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ > > > + default-state = "on"; > > > > Add additional properties, like function and color. > > > > > + }; > > > + }; > > > + > > > + gpio-keys { > > > + compatible = "gpio-keys"; > > > + autorepeat; > > > > Why is autorepeat needed? > > > > > + label = "GPIO Keys"; > > > > I guess label is self evident and not needed? > > > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&pocketbook_btn_pins>; > > > > Again, GPIOs don't need pinctrl nodes. I know that you specified pull up, but > > please try without. Other boards have same design and it's not needed. > > > > > + > > > + key-right { > > > + label = "Right"; > > > + linux,code = <KEY_NEXT>; > > > + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ > > > + }; > > > + > > > + key-left { > > > + label = "Left"; > > > + linux,code = <KEY_PREVIOUS>; > > > + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ > > > + }; > > > + }; > > > + > > > + reg_3v3_mmc0: regulator-mmc0 { > > > + compatible = "regulator-fixed"; > > > + regulator-name = "vdd-mmc0"; > > > + regulator-min-microvolt = <3300000>; > > > + regulator-max-microvolt = <3300000>; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&pocketbook_reg_mmc0_pins>; > > > > again, pinctrl not needed. > > > > > + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ > > > + vin-supply = <®_vcc3v3>; > > > + }; > > > +}; > > > + > > > +&cpu0 { > > > + cpu-supply = <®_dcdc2>; > > > +}; > > > + > > > +&ehci0 { > > > + status = "okay"; > > > +}; > > > + > > > +&i2c0 { > > > + status = "okay"; > > > + > > > + axp209: pmic@34 { > > > + compatible = "x-powers,axp209"; > > > + reg = <0x34>; > > > + interrupts = <0>; > > > + }; > > > +}; > > > + > > > +#include "axp209.dtsi" > > > + > > > +&i2c1 { > > > + status = "okay"; > > > + > > > + pcf8563: rtc@51 { > > > + compatible = "nxp,pcf8563"; > > > + reg = <0x51>; > > > + #clock-cells = <0>; > > > + }; > > > +}; > > > + > > > +&i2c2 { > > > + status = "okay"; > > > + > > > + /* Touchpanel is connected here. */ > > > > Any reason why don't you specify touch panel device here? > > > My mistake, I copied this node from another device. This device does not have a touchpanel at all. > > > +}; > > > + > > > +&lradc { > > > + vref-supply = <®_ldo2>; > > > + status = "okay"; > > > + > > > + button-300 { > > > + label = "Down"; > > > + linux,code = <KEY_DOWN>; > > > + channel = <0>; > > > + voltage = <300000>; > > > + }; > > > + > > > + button-700 { > > > + label = "Up"; > > > + linux,code = <KEY_UP>; > > > + channel = <0>; > > > + voltage = <700000>; > > > + }; > > > + > > > + button-1000 { > > > + label = "Left"; > > > + linux,code = <KEY_LEFT>; > > > + channel = <0>; > > > + voltage = <1000000>; > > > + }; > > > + > > > + button-1200 { > > > + label = "Menu"; > > > + linux,code = <KEY_MENU>; > > > + channel = <0>; > > > + voltage = <1200000>; > > > + }; > > > + > > > + button-1500 { > > > + label = "Right"; > > > + linux,code = <KEY_RIGHT>; > > > + channel = <0>; > > > + voltage = <1500000>; > > > + }; > > > +}; > > > + > > > +&mmc0 { > > > + vmmc-supply = <®_3v3_mmc0>; > > > + bus-width = <4>; > > > + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ > > > + status = "okay"; > > > +}; > > > + > > > +&mmc2 { > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&mmc2_4bit_pc_pins>; > > > + vmmc-supply = <®_vcc3v3>; > > > + bus-width = <4>; > > > + non-removable; > > > + status = "okay"; > > > +}; > > > + > > > +&ohci0 { > > > + status = "okay"; > > > +}; > > > + > > > +&otg_sram { > > > + status = "okay"; > > > +}; > > > + > > > +&pio { > > > + led_pins_pocketbook: led-pin { > > > + pins = "PE8"; > > > + function = "gpio_out"; > > > + }; > > > + pocketbook_btn_pins: btn-pins { > > > + pins = "PG9", "PG10"; > > > + function = "gpio_in"; > > > + bias-pull-up; > > > + }; > > > + pocketbook_reg_mmc0_pins: reg-mmc0-pins { > > > + pins = "PE4"; > > > + function = "gpio_out"; > > > + }; > > > +}; > > > > Whole PIO node can be dropped. > > > > Best regards, > > Jernej > > > > > + > > > +®_dcdc2 { > > > + regulator-always-on; > > > + regulator-min-microvolt = <1000000>; > > > + regulator-max-microvolt = <1500000>; > > > + regulator-name = "vdd-cpu"; > > > +}; > > > + > > > +®_dcdc3 { > > > + regulator-always-on; > > > + regulator-min-microvolt = <1000000>; > > > + regulator-max-microvolt = <1400000>; > > > + regulator-name = "vdd-int-dll"; > > > +}; > > > + > > > +®_ldo1 { > > > + regulator-name = "vdd-rtc"; > > > +}; > > > + > > > +®_ldo2 { > > > + regulator-always-on; > > > + regulator-min-microvolt = <3000000>; > > > + regulator-max-microvolt = <3000000>; > > > + regulator-name = "avcc"; > > > +}; > > > + > > > +®_ldo3 { > > > + regulator-min-microvolt = <3300000>; > > > + regulator-max-microvolt = <3300000>; > > > + regulator-name = "vcc-wifi"; > > > +}; > > > + > > > +®_usb0_vbus { > > > + status = "okay"; > > > + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ > > > +}; > > > + > > > +®_usb1_vbus { > > > + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ > > > + status = "okay"; > > > +}; > > > + > > > +&uart1 { > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&uart1_pg_pins>; > > > + status = "okay"; > > > +}; > > > + > > > +&usb_otg { > > > + dr_mode = "otg"; > > > + status = "okay"; > > > +}; > > > + > > > +&usb_power_supply { > > > + status = "okay"; > > > +}; > > > + > > > +&battery_power_supply { > > > + status = "okay"; > > > +}; > > > + > > > +&usbphy { > > > + usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */ I missed this before, but is pull up property really needed? It doesn't make much sense. > > > + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; > > > + usb0_vbus-supply = <®_usb0_vbus>; > > > + usb1_vbus-supply = <®_usb1_vbus>; > > > + status = "okay"; > > > +}; > > > > > > > > > > > > Yes, everything works without pincrtl. One guy told me that I need to specify pinctrl for each pin used. pinctrl node is only needed when multiplexed pin is used for something else than GPIO. Best regards, Jernej > Thanks for the review. > Best regards, > Denis > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-14 19:18 ` Jernej Škrabec @ 2024-03-16 14:39 ` Denis Burkov 2024-03-16 18:06 ` Jernej Škrabec 0 siblings, 1 reply; 8+ messages in thread From: Denis Burkov @ 2024-03-16 14:39 UTC (permalink / raw) To: Jernej Skrabec Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, Denis Burkov What works: - Serial console - mmc0, mmc2 (both microSD card slots on the board) - All buttons (gpio and lradc based) - Power LED - PMIC - RTC - USB OTG/gadgets mode Signed-off-by: Denis Burkov <hitechshell@mail.ru> --- arch/arm/boot/dts/allwinner/Makefile | 1 + .../sun5i-a13-pocketbook-614-plus.dts | 215 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile index 5fbb44ddacd0..6209243ad975 100644 --- a/arch/arm/boot/dts/allwinner/Makefile +++ b/arch/arm/boot/dts/allwinner/Makefile @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a13-olinuxino.dtb \ sun5i-a13-olinuxino-micro.dtb \ sun5i-a13-pocketbook-touch-lux-3.dtb \ + sun5i-a13-pocketbook-614-plus.dtb \ sun5i-a13-q8-tablet.dtb \ sun5i-a13-utoo-p66.dtb \ sun5i-gr8-chip-pro.dtb \ diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts new file mode 100644 index 000000000000..b5449301789a --- /dev/null +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts @@ -0,0 +1,215 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> + */ + +/dts-v1/; +#include "sun5i-a13.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + model = "PocketBook 614 Plus"; + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; + + aliases { + serial0 = &uart1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led { + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ + default-state = "on"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + key-right { + label = "Right"; + linux,code = <KEY_NEXT>; + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ + }; + + key-left { + label = "Left"; + linux,code = <KEY_PREVIOUS>; + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ + }; + }; + + reg_3v3_mmc0: regulator-mmc0 { + compatible = "regulator-fixed"; + regulator-name = "vdd-mmc0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ + vin-supply = <®_vcc3v3>; + }; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&ehci0 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupts = <0>; + }; +}; + +#include "axp209.dtsi" + +&i2c1 { + status = "okay"; + + pcf8563: rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + +&lradc { + vref-supply = <®_ldo2>; + status = "okay"; + + button-300 { + label = "Down"; + linux,code = <KEY_DOWN>; + channel = <0>; + voltage = <300000>; + }; + + button-700 { + label = "Up"; + linux,code = <KEY_UP>; + channel = <0>; + voltage = <700000>; + }; + + button-1000 { + label = "Left"; + linux,code = <KEY_LEFT>; + channel = <0>; + voltage = <1000000>; + }; + + button-1200 { + label = "Menu"; + linux,code = <KEY_MENU>; + channel = <0>; + voltage = <1200000>; + }; + + button-1500 { + label = "Right"; + linux,code = <KEY_RIGHT>; + channel = <0>; + voltage = <1500000>; + }; +}; + +&mmc0 { + vmmc-supply = <®_3v3_mmc0>; + bus-width = <4>; + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ + status = "okay"; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_4bit_pc_pins>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&otg_sram { + status = "okay"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1500000>; + regulator-name = "vdd-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_usb0_vbus { + status = "okay"; + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ +}; + +®_usb1_vbus { + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pg_pins>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usb_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; + usb0_vbus-supply = <®_usb0_vbus>; + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +}; -- 2.43.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ARM: dts: sun5i: Add PocketBook 614 Plus support 2024-03-16 14:39 ` [PATCH v2] " Denis Burkov @ 2024-03-16 18:06 ` Jernej Škrabec 0 siblings, 0 replies; 8+ messages in thread From: Jernej Škrabec @ 2024-03-16 18:06 UTC (permalink / raw) To: Denis Burkov Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Samuel Holland, Maxime Ripard, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, Denis Burkov Hi Denis! Before I review, please resend this series properly. It shouldn't be sent as response to old series, but as a new thread. Also, it has to be complete, in this case with first patch, with review/ack tags where applicable. Best regards, Jernej Dne sobota, 16. marec 2024 ob 15:39:18 CET je Denis Burkov napisal(a): > What works: > > - Serial console > - mmc0, mmc2 (both microSD card slots on the board) > - All buttons (gpio and lradc based) > - Power LED > - PMIC > - RTC > - USB OTG/gadgets mode > > Signed-off-by: Denis Burkov <hitechshell@mail.ru> > --- > arch/arm/boot/dts/allwinner/Makefile | 1 + > .../sun5i-a13-pocketbook-614-plus.dts | 215 ++++++++++++++++++ > 2 files changed, 216 insertions(+) > create mode 100644 arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > > diff --git a/arch/arm/boot/dts/allwinner/Makefile b/arch/arm/boot/dts/allwinner/Makefile > index 5fbb44ddacd0..6209243ad975 100644 > --- a/arch/arm/boot/dts/allwinner/Makefile > +++ b/arch/arm/boot/dts/allwinner/Makefile > @@ -61,6 +61,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \ > sun5i-a13-olinuxino.dtb \ > sun5i-a13-olinuxino-micro.dtb \ > sun5i-a13-pocketbook-touch-lux-3.dtb \ > + sun5i-a13-pocketbook-614-plus.dtb \ > sun5i-a13-q8-tablet.dtb \ > sun5i-a13-utoo-p66.dtb \ > sun5i-gr8-chip-pro.dtb \ > diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > new file mode 100644 > index 000000000000..b5449301789a > --- /dev/null > +++ b/arch/arm/boot/dts/allwinner/sun5i-a13-pocketbook-614-plus.dts > @@ -0,0 +1,215 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2024 Denis Burkov <hitechshell@mail.ru> > + */ > + > +/dts-v1/; > +#include "sun5i-a13.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > + > +/ { > + model = "PocketBook 614 Plus"; > + compatible = "pocketbook,614-plus", "allwinner,sun5i-a13"; > + > + aliases { > + serial0 = &uart1; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + led { > + gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */ > + default-state = "on"; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + key-right { > + label = "Right"; > + linux,code = <KEY_NEXT>; > + gpios = <&pio 6 9 GPIO_ACTIVE_LOW>; /* PG9 */ > + }; > + > + key-left { > + label = "Left"; > + linux,code = <KEY_PREVIOUS>; > + gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ > + }; > + }; > + > + reg_3v3_mmc0: regulator-mmc0 { > + compatible = "regulator-fixed"; > + regulator-name = "vdd-mmc0"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */ > + vin-supply = <®_vcc3v3>; > + }; > +}; > + > +&cpu0 { > + cpu-supply = <®_dcdc2>; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&i2c0 { > + status = "okay"; > + > + axp209: pmic@34 { > + compatible = "x-powers,axp209"; > + reg = <0x34>; > + interrupts = <0>; > + }; > +}; > + > +#include "axp209.dtsi" > + > +&i2c1 { > + status = "okay"; > + > + pcf8563: rtc@51 { > + compatible = "nxp,pcf8563"; > + reg = <0x51>; > + #clock-cells = <0>; > + }; > +}; > + > +&lradc { > + vref-supply = <®_ldo2>; > + status = "okay"; > + > + button-300 { > + label = "Down"; > + linux,code = <KEY_DOWN>; > + channel = <0>; > + voltage = <300000>; > + }; > + > + button-700 { > + label = "Up"; > + linux,code = <KEY_UP>; > + channel = <0>; > + voltage = <700000>; > + }; > + > + button-1000 { > + label = "Left"; > + linux,code = <KEY_LEFT>; > + channel = <0>; > + voltage = <1000000>; > + }; > + > + button-1200 { > + label = "Menu"; > + linux,code = <KEY_MENU>; > + channel = <0>; > + voltage = <1200000>; > + }; > + > + button-1500 { > + label = "Right"; > + linux,code = <KEY_RIGHT>; > + channel = <0>; > + voltage = <1500000>; > + }; > +}; > + > +&mmc0 { > + vmmc-supply = <®_3v3_mmc0>; > + bus-width = <4>; > + cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ > + status = "okay"; > +}; > + > +&mmc2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mmc2_4bit_pc_pins>; > + vmmc-supply = <®_vcc3v3>; > + bus-width = <4>; > + non-removable; > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; > + > +&otg_sram { > + status = "okay"; > +}; > + > +®_dcdc2 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1500000>; > + regulator-name = "vdd-cpu"; > +}; > + > +®_dcdc3 { > + regulator-always-on; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1400000>; > + regulator-name = "vdd-int-dll"; > +}; > + > +®_ldo1 { > + regulator-name = "vdd-rtc"; > +}; > + > +®_ldo2 { > + regulator-always-on; > + regulator-min-microvolt = <3000000>; > + regulator-max-microvolt = <3000000>; > + regulator-name = "avcc"; > +}; > + > +®_usb0_vbus { > + status = "okay"; > + gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ > +}; > + > +®_usb1_vbus { > + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ > + status = "okay"; > +}; > + > +&uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart1_pg_pins>; > + status = "okay"; > +}; > + > +&usb_otg { > + dr_mode = "otg"; > + status = "okay"; > +}; > + > +&usb_power_supply { > + status = "okay"; > +}; > + > +&battery_power_supply { > + status = "okay"; > +}; > + > +&usbphy { > + usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ > + usb0_vbus_det-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; > + usb0_vbus-supply = <®_usb0_vbus>; > + usb1_vbus-supply = <®_usb1_vbus>; > + status = "okay"; > +}; > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus 2024-03-14 15:53 [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Denis Burkov 2024-03-14 15:53 ` [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support Denis Burkov @ 2024-03-15 17:34 ` Rob Herring 1 sibling, 0 replies; 8+ messages in thread From: Rob Herring @ 2024-03-15 17:34 UTC (permalink / raw) To: Denis Burkov Cc: Krzysztof Kozlowski, Chen-Yu Tsai, Rob Herring, linux-arm-kernel, Jernej Skrabec, linux-sunxi, Samuel Holland, devicetree, Conor Dooley, Maxime Ripard, linux-kernel On Thu, 14 Mar 2024 20:53:05 +0500, Denis Burkov wrote: > Add a new board name. > > Signed-off-by: Denis Burkov <hitechshell@mail.ru> > --- > Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-16 18:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-14 15:53 [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Denis Burkov 2024-03-14 15:53 ` [PATCH 2/2] ARM: dts: sun5i: Add PocketBook 614 Plus support Denis Burkov 2024-03-14 17:14 ` Jernej Škrabec 2024-03-14 18:18 ` hitechshell 2024-03-14 19:18 ` Jernej Škrabec 2024-03-16 14:39 ` [PATCH v2] " Denis Burkov 2024-03-16 18:06 ` Jernej Škrabec 2024-03-15 17:34 ` [PATCH 1/2] dt-bindings: arm: sunxi: Add PocketBook 614 Plus Rob Herring
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).