ITOP-RK3588适配AT8339芯片实现RTC

1、修改~/3588-linux/kernel/arch/arm64/boot/dts/rockchip/topeet_rk3588_config.dtsi。

官方默认配置是hym8563芯片,因项目需要现修改为AT8339芯片,RK3588支持多款RTC芯片,若找不到对应的驱动可以考虑替代芯片的驱动。例如:AT8339芯片和DS1339芯片硬件环境相同,I2C读写相同,所以可以直接用DS1339的驱动。

//rtc
&i2c6 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&i2c6m0_xfer>;
/*
	hym8563: hym8563@68 {
		compatible = "haoyu,hym8563";
		reg = <0x68>;
		#clock-cells = <0>;
		clock-frequency = <32768>;
		clock-output-names = "hym8563";
		pinctrl-names = "default";
		pinctrl-0 = <&hym8563_int>;
		interrupt-parent = <&gpio0>;
		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
		wakeup-source;
	};
*/
	ds1339: rtc@68 {
		compatible = "dallas,ds1339";
		reg = <0x68>;
		//interrupt-parent = <&gpio4>;
		//interrupts = <20 0>;
		trickle-resistor-ohms = <250>;
	};
};

2、修改~/3588-linux/kernel/arch/arm64/boot/dts/rockchip/rk3588-evb7-lp4.dtsi,注释掉hym8563的相关操作

sdio_pwrseq: sdio-pwrseq {
		compatible = "mmc-pwrseq-simple";
	//	clocks = <&hym8563>;
		clock-names = "ext_clock";
		pinctrl-names = "default";
		pinctrl-0 = <&wifi_enable_h>;
		/*
		 * On the module itself this is one of these (depending
		 * on the actual card populated):
		 * - SDIO_RESET_L_WL_REG_ON
		 * - PDN (power down when low)
		 */
		post-power-on-delay-ms = <200>;
		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
	};

wireless_bluetooth: wireless-bluetooth {
		compatible = "bluetooth-platdata";
	//	clocks = <&hym8563>;
		clock-names = "ext_clock";
		uart_rts_gpios = <&gpio4 RK_PC4 GPIO_ACTIVE_LOW>;
		pinctrl-names = "default", "rts_gpio";
		pinctrl-0 = <&uart9m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
		pinctrl-1 = <&uart9_gpios>;
		BT,reset_gpio    = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
		BT,wake_gpio     = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
		BT,wake_host_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
		status = "disabled";
	};

/*
	hym8563 {
		hym8563_int: hym8563-int {
			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};
*/

3、修改后编译内核./build.sh kernel ,图形化菜单选择:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值