Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ivan Sergeev <ivan8215145640@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2
Date: Mon, 30 Dec 2024 18:15:14 +0100	[thread overview]
Message-ID: <2122a623-4124-4551-92a6-44273c43f71e@kernel.org> (raw)
In-Reply-To: <20241230-bigtreetech-cb2-v4-2-26d2d30e07ce@gmail.com>

On 30/12/2024 15:58, Ivan Sergeev wrote:
> BigTreeTech CB2 and Pi2 share a lot of hardware configuration, so a
> common dtsi file was used to define common nodes and properties. This is
> similar to how BigTreeTech CB1 and Pi are implemented.
> 


...

> +			vcc3v3_sd: SWITCH_REG2 {
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-name = "vcc3v3_sd";
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +		};
> +
> +		codec {
> +			rockchip,mic-in-differential;
> +		};
> +	};
> +};
> +
> +&i2c2 {
> +	pinctrl-0 = <&i2c2m1_xfer>;
> +};
> +
> +&i2c3 {
> +	status = "okay";
> +
> +	tft_tp: ns2009@48 {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation



> +		compatible = "ti,tsc2007";
> +		reg = <0x48>;
> +		status = "okay";
> +		ti,x-plate-ohms = <660>;
> +		ti,rt-thr = <3000>;
> +		ti,fuzzx = <32>;
> +		ti,fuzzy = <16>;
> +	};
> +};
> +
> +&i2s0_8ch {
> +	status = "okay";
> +};
> +
> +&i2s1_8ch {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2s1m0_sclktx
> +			&i2s1m0_lrcktx
> +			&i2s1m0_sdi0
> +			&i2s1m0_sdo0>;

Why this can't be one line?

> +	rockchip,trcm-sync-tx-only;
> +	status = "okay";
> +};
> +
> +&spi1 {
> +	pinctrl-0 = <&spi1m1_cs0 &spi1m1_pins>;
> +
> +	can_mcp2515: can-mcp2515@0 {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


> +		status = "disabled";

Why? Anyway, srtatus is never the first property for new nodes.

> +		compatible = "microchip,mcp2515";
> +		reg = <0x00>;
> +		interrupt-parent = <&gpio4>;
> +		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> +		spi-max-frequency = <10000000>;
> +		clocks = <&can_mcp2515_osc>;
> +		vdd-supply = <&vcc3v3_sys>;
> +		xceiver-supply = <&vcc3v3_sys>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&mcp2515_int_pin>;
> +	};
> +};
> +
> +&spi3 {
> +	pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
> +};
> +
> +&pcie2x1 {
> +	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie_reset_h>;
> +	vpcie3v3-supply = <&vcc3v3_pcie>;
> +	status = "okay";
> +};
> +
> +&pinctrl {
> +	wireless-bluetooth {
> +		uart1_gpios: uart1-gpios {
> +			rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	sd {
> +		sdmmc0_pwr_h: sdmmc0-pwr-h {
> +			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	mxc6655xa {
> +		mxc6655xa_irq_gpio: mxc6655xa_irq_gpio {


...

> +	};
> +
> +	bt {
> +		bt_enable: bt-enable-h {
> +			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_down>;
> +		};
> +
> +		bt_host_wake: bt-host-wake-l {
> +			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
> +		};
> +
> +		bt_wake: bt-wake-l {
> +			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
> +	mcp2515_int_pin {
> +		mcp2515_int_pin: mcp2515_in_pin {

Don't use underscore. See DTS coding style.

> +			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
> +		};
> +	};
> +};
> +
> +&pmu_io_domains {
> +		status = "okay";
> +		pmuio1-supply = <&vcc3v3_pmu>;
> +		pmuio2-supply = <&vcc3v3_pmu>;
> +		vccio1-supply = <&vcc_3v3>;
> +		vccio2-supply = <&vcc_1v8>;
> +		vccio3-supply = <&vccio_sd>;
> +		vccio4-supply = <&vcc_1v8>;
> +		vccio5-supply = <&vcc_3v3>;
> +		vccio6-supply = <&vcc_3v3>;
> +		vccio7-supply = <&vcc_3v3>;

Messed indentation



> +
> +&sdmmc0 {
> +	max-frequency = <150000000>;
> +	bus-width = <4>;
> +	cap-mmc-highspeed;
> +	cap-sd-highspeed;
> +	disable-wp;
> +	//sd-uhs-sdr104;

Drop dead code

> +	vmmc-supply = <&vcc_sd>;
> +	vqmmc-supply = <&vccio_sd>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
> +	status = "okay";
> +};
> +
> +&sdmmc1 {
> +	/* WiFi & BT combo module AMPAK AP6256 */
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	max-frequency = <150000000>;
> +	bus-width = <4>;
> +	disable-wp;
> +	cap-sd-highspeed;
> +	cap-sdio-irq;
> +	keep-power-in-suspend;
> +	mmc-pwrseq = <&sdio_pwrseq>;
> +	non-removable;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
> +	sd-uhs-sdr104;
> +	status = "okay";

Status is always the last property... or the first in overrides, but not
middle.

> +	rockchip,default-sample-phase = <90>;
> +
> +	sdio-wifi@1 {
> +		compatible = "brcm,bcm4329-fmac";
> +		reg = <1>;
> +		interrupt-parent = <&gpio2>;
> +		interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
> +		interrupt-names = "host-wake";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wifi_host_wake>;
> +		brcm,drive-strength = <10>;
> +	};
> +};
> +
> +&sfc {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	status = "okay";
> +};
> +
> +&tsadc {
> +	status = "okay";
> +};
> +
> +&uart1 {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
> +	uart-has-rtscts;
> +	dma-names = "tx\0rx";

Hm? NUL byte?

> +
> +	bluetooth {
> +		compatible = "brcm,bcm4345c5";
> +		clocks = <&rk809 1>;
> +		clock-names = "lpo";
> +		device-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
> +		host-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
> +		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
> +		//pinctrl-names = "default";
> +		//pinctrl-0 = <&bt_host_wake &bt_wake &bt_enable>;
Drop dead code

Best regards,
Krzysztof

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2024-12-30 17:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-30 14:58 [PATCH v4 0/2] arm64: dts: rockchip: Add BigTreeTech CB2 and Pi2 Ivan Sergeev
2024-12-30 14:58 ` [PATCH v4 1/2] dt-bindings: arm: " Ivan Sergeev
2024-12-30 14:58 ` [PATCH v4 2/2] arm64: dts: " Ivan Sergeev
2024-12-30 17:15   ` Krzysztof Kozlowski [this message]
2024-12-30 18:17 ` [PATCH v4 0/2] " Rob Herring (Arm)
2025-01-05  9:33   ` Ivan Sergeev
2025-01-05  9:47     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2122a623-4124-4551-92a6-44273c43f71e@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=ivan8215145640@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox